|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.escape.ShortArrayReplacer
final class ShortArrayReplacer
Class that performs scalar replacement of short arrays
Field Summary | |
---|---|
private IR |
ir
the governing IR |
private Register |
reg
the register holding the array reference |
private int |
size
number of elements in the array |
private RVMArray |
vmArray
type of the array |
Constructor Summary | |
---|---|
private |
ShortArrayReplacer(Register r,
RVMArray a,
int s,
IR i)
|
Method Summary | |
---|---|
private static boolean |
containsUnsupportedUse(IR ir,
Register reg,
int size,
RVMArray vmArray,
Set<Register> visited)
Some cases we don't handle yet. |
static ShortArrayReplacer |
getReplacer(Instruction inst,
IR ir)
Return an object representing this transformation for a given allocation site |
private void |
scalarReplace(RegisterOperand use,
RegisterOperand[] scalars,
Set<Register> visited)
Replace a given use of an array with its scalar equivalent. |
void |
transform()
Perform the transformation |
private void |
transform2(Register reg,
Instruction defI,
RegisterOperand[] scalars)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final int size
private final RVMArray vmArray
private final Register reg
private final IR ir
Constructor Detail |
---|
private ShortArrayReplacer(Register r, RVMArray a, int s, IR i)
r
- the register holding the array referencea
- the type of the array to replaces
- the size of the array to replacei
- the IRMethod Detail |
---|
public static ShortArrayReplacer getReplacer(Instruction inst, IR ir)
inst
- the allocation siteir
-
public void transform()
AggregateReplacer
transform
in interface AggregateReplacer
private void transform2(Register reg, Instruction defI, RegisterOperand[] scalars)
private void scalarReplace(RegisterOperand use, RegisterOperand[] scalars, Set<Register> visited)
use
- the use to replacescalars
- an array of scalar register operands to replace
the array withprivate static boolean containsUnsupportedUse(IR ir, Register reg, int size, RVMArray vmArray, Set<Register> visited)
ir
- the governing IRreg
- the register in questionsize
- the size of the array to scalar replace.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |