once we find a guard that is loop variant, all code after the guard must be loop variant because it is control dependent on the guard. if the guard fires, the code should not run even if it is not loop variable. it is common to have guards early in the trace that are loop variant therefore most code cannot be hoisted, and loop variant hoisting isn't worth the effort in its current form. one idea for a new approach is to unroll the loop once by assembling it fully, then assembling it again but only generating the truly loop variant code. then, control dependencies are honored and more code can be excluded from the loop body. it might also be possible for guards that are copied to share the same exit block.
Assignee: rreitmai → nobody
Component: Virtual Machine → Tracing Virtual Machine
QA Contact: vm → tracing-vm
Edwin, how will your trace-tree changes (which largely remove exit blocks) affect this?
I (In reply to comment #1) > Edwin, how will your trace-tree changes (which largely remove exit blocks) > affect this? > 417047 removed the old loop hoisting code, and no new code has been added. It also removes the extra cells in RegionTracker that the old code used to figure out what vars were loop variant, or not. the new loop hoisting code will need to know about trees of course, the test is to hoist expressions that are not variant on any path back to the top of the loop.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.