Issue Details (XML | Word | Printable)

Key: RVM-261
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Ian Rogers
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RVM

(Investigate) improving LICM

Created: 20/Sep/07 04:50 PM   Updated: 11/Apr/08 09:29 AM
Component/s: Compiler: Optimizing
Affects Version/s: None
Fix Version/s: 1000

Time Tracking:
Not Specified


 Description  « Hide
Loop invariant code motion (LICM) schedules instructions related to the frequency of the basic block they are contained within. When scheduling in blocks with the same frequency the instructions can be scheduled:

early - close to source operands but furthest from destination operands
late - far from source operands but close to destination operands not moved - this means they will either be early, late or somewhere in between. The cost in not moving an instruction in the LICM phase should be cheaper than moving it.

Currently LICM schedules instructions late based on an evaluation by Martin Trapp in 2002.

It seems this should be re-evaluated on the current benchmarks for the RVM and also to consider the operands to the instruction. It could be logical that if the number of operands are:

<1 - it's worth scheduling the instruction as close to where it will be used as possible, to avoid keeping the value live in a register
1 - one use and one definition means things are balanced, instructions can either move or not. Not moving should save compiler time, moving early or late might get lucky with register pressure. If the block execution frequencies are not accurate, not moving should be the most conservative thing to do
>1 - scheduling the instruction close to where its operands will become available should mean the larger number of source operands are kept live
for the shortest period

This issue replaces SF RFE tracker #1660931.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.