|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.compilers.opt.escape.ObjectReplacer
final class ObjectReplacer
Class that performs scalar replacement of aggregates for non-array objects
| Field Summary | |
|---|---|
private IR |
ir
the IR |
private RVMClass |
klass
type of the object |
private Register |
reg
the register holding the object reference |
| Constructor Summary | |
|---|---|
private |
ObjectReplacer(Register r,
RVMClass _klass,
IR i)
|
| Method Summary | |
|---|---|
private static boolean |
containsUnsupportedUse(IR ir,
Register reg,
RVMClass klass,
Set<Register> visited)
Some cases we don't handle yet. |
private static ArrayList<RVMField> |
getFieldsAsArrayList(RVMClass klass)
Returns a ArrayList |
static ObjectReplacer |
getReplacer(Instruction inst,
IR ir)
Return an object representing this transformation for a given allocation site |
private void |
scalarReplace(RegisterOperand use,
RegisterOperand[] scalars,
ArrayList<RVMField> fields,
Set<Register> visited)
Replace a given use of a object with its scalar equivalent |
void |
transform()
Perform the transformation |
private void |
transform2(Register reg,
Instruction defI,
RegisterOperand[] scalars,
ArrayList<RVMField> fields,
Set<Register> visited)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final RVMClass klass
private final IR ir
private final Register reg
| Constructor Detail |
|---|
private ObjectReplacer(Register r,
RVMClass _klass,
IR i)
r - the register holding the object reference_klass - the type of the object to replacei - the IR| Method Detail |
|---|
public static ObjectReplacer getReplacer(Instruction inst,
IR ir)
inst - the allocation siteir -
public void transform()
transform in interface AggregateReplacer
private void transform2(Register reg,
Instruction defI,
RegisterOperand[] scalars,
ArrayList<RVMField> fields,
Set<Register> visited)
private static ArrayList<RVMField> getFieldsAsArrayList(RVMClass klass)
klass - the type of the object
private void scalarReplace(RegisterOperand use,
RegisterOperand[] scalars,
ArrayList<RVMField> fields,
Set<Register> visited)
use - the use to replacescalars - an array of scalar register operands to replace
the object's fields with
private static boolean containsUnsupportedUse(IR ir,
Register reg,
RVMClass klass,
Set<Register> visited)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||