|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.compilers.opt.regalloc.Coalesce
class Coalesce
Utility to help coalesce registers.
CoalesceMoves| Constructor Summary | |
|---|---|
Coalesce()
|
|
| Method Summary | |
|---|---|
static boolean |
attempt(IR ir,
LiveAnalysis live,
Register r1,
Register r2)
Attempt to coalesce register r2 into register r1. |
private static boolean |
isLiveAtDef(Register r1,
Register r2,
LiveAnalysis live)
Is register r1 live at any def of register r2? |
private static boolean |
split(Register r1,
Register r2)
Is there an instruction r1 = split r2 or r2 = split r1?? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
Coalesce()
| Method Detail |
|---|
public static boolean attempt(IR ir,
LiveAnalysis live,
Register r1,
Register r2)
ir - the governing IRlive - liveness information for the IRr1 - r2 -
private static boolean isLiveAtDef(Register r1,
Register r2,
LiveAnalysis live)
PRECONDITION def-use chains must be computed and valid. PRECONDITION instructions are numbered, with numbers stored in Instruction.scratch
Note: this implementation is not efficient. The liveness data structures must be re-designed to support this efficiently.
private static boolean split(Register r1,
Register r2)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||