TT: redesign loop hoisting so more code can be hoisted out of a loop

VERIFIED WONTFIX

Status

Tamarin
Tracing Virtual Machine
P2
normal
VERIFIED WONTFIX
11 years ago
9 years ago

People

(Reporter: Edwin Smith, Unassigned)

Tracking

Details

(Reporter)

Description

11 years ago
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.
(Reporter)

Updated

10 years ago
Assignee: rreitmai → nobody
Component: Virtual Machine → Tracing Virtual Machine
QA Contact: vm → tracing-vm

Comment 1

10 years ago
Edwin, how will your trace-tree changes (which largely remove exit blocks) affect this?
(Reporter)

Comment 2

10 years ago
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.
(Reporter)

Updated

10 years ago
Priority: -- → P4

Updated

10 years ago
Priority: P4 → P2

Updated

9 years ago
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WONTFIX

Updated

9 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.