|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.ir.IRTools org.jikesrvm.compilers.opt.hir2lir.ConvertToLowLevelIR
public abstract class ConvertToLowLevelIR
Converts all remaining instructions with HIR-only operators into an equivalent sequence of LIR operators.
Field Summary | |
---|---|
private static BranchOptimizations |
branchOpts
|
static boolean |
LOWER_ARRAY_ACCESS
We have slightly different ideas of what the LIR should look like for IA32 and PowerPC. |
Constructor Summary | |
---|---|
ConvertToLowLevelIR()
|
Method Summary | |
---|---|
private static BasicBlock |
_lookupswitchHelper(Instruction switchInstr,
RegisterOperand reg,
BasicBlock defaultBB,
IR ir,
BasicBlock curBlock,
int low,
int high,
int min,
int max)
Helper function to generate the binary search tree for a lookupswitch bytecode |
(package private) static Instruction |
callHelper(Instruction v,
IR ir)
Helper method for call expansion. |
(package private) static void |
convert(IR ir,
OptOptions options)
Converts the given HIR to LIR. |
static void |
doArrayLoad(Instruction s,
IR ir,
Operator op,
int logwidth)
Expand an array load. |
static void |
doArrayStore(Instruction s,
IR ir,
Operator op,
int logwidth)
Expand an array store. |
static void |
expandSysCallTarget(Instruction s,
IR ir)
Expand symbolic SysCall target into a chain of loads from the bootrecord to the desired target address. |
static RegisterOperand |
getField(Instruction s,
IR ir,
RegisterOperand obj,
RVMField field)
Load an instance field. |
(package private) static RegisterOperand |
getField(Instruction s,
IR ir,
RegisterOperand obj,
RVMField field,
Operand guard)
Load an instance field. |
(package private) static RegisterOperand |
getInstanceMethod(Instruction s,
IR ir,
Operand tib,
RVMMethod method)
Get an instance method from a TIB |
(package private) static RegisterOperand |
getSpecialMethod(Instruction s,
IR ir,
int smid)
support for direct call to specialized method. |
static RegisterOperand |
getStatic(Instruction s,
IR ir,
RVMField field)
Load a static field. |
(package private) static Operand |
getTIB(Instruction s,
IR ir,
Operand obj,
Operand guard)
get the tib from the object pointer to by obj |
(package private) static Operand |
getTIB(Instruction s,
IR ir,
RVMType type)
get the class tib for type |
(package private) static Operand |
getTIB(Instruction s,
IR ir,
TypeOperand type)
get the class tib for type |
static RegisterOperand |
insertBinary(Instruction s,
IR ir,
Operator operator,
TypeReference type,
Operand o1,
Operand o2)
Insert a binary instruction before s in the instruction stream. |
(package private) static RegisterOperand |
InsertGuardedUnary(Instruction s,
IR ir,
Operator operator,
TypeReference type,
Operand o1,
Operand guard)
Insert a guarded unary instruction before s in the instruction stream. |
(package private) static RegisterOperand |
InsertLoadOffset(Instruction s,
IR ir,
Operator operator,
TypeReference type,
Operand reg2,
Offset offset)
Insert a load off before s in the instruction stream. |
(package private) static RegisterOperand |
InsertLoadOffset(Instruction s,
IR ir,
Operator operator,
TypeReference type,
Operand reg2,
Offset offset,
LocationOperand loc,
Operand guard)
Insert a load off before s in the instruction stream. |
(package private) static RegisterOperand |
InsertLoadOffset(Instruction s,
IR ir,
Operator operator,
TypeReference type,
Operand reg2,
Offset offset,
Operand guard)
Insert a load off before s in the instruction stream. |
(package private) static RegisterOperand |
InsertLoadOffset(Instruction s,
IR ir,
Operator operator,
TypeReference type,
Operand reg2,
Operand offset,
LocationOperand loc,
Operand guard)
Insert a load off before s in the instruction stream. |
(package private) static RegisterOperand |
InsertLoadOffsetJTOC(Instruction s,
IR ir,
Operator operator,
TypeReference type,
Offset offset)
Insert a load off the JTOC before s in the instruction stream. |
(package private) static RegisterOperand |
InsertLoadOffsetJTOC(Instruction s,
IR ir,
Operator operator,
TypeReference type,
Operand offset)
Insert a load off the JTOC before s in the instruction stream. |
(package private) static RegisterOperand |
InsertUnary(Instruction s,
IR ir,
Operator operator,
TypeReference type,
Operand o1)
Insert a unary instruction before s in the instruction stream. |
(package private) static Instruction |
lookup(Instruction switchInstr,
IR ir)
Expand a lookupswitch. |
private static Instruction |
resolveMember(Instruction s,
IR ir)
Generate the code to resolve a member (field/method) reference. |
(package private) static Instruction |
tableswitch(Instruction s,
IR ir)
Expand a tableswitch. |
Methods inherited from class org.jikesrvm.compilers.opt.ir.IRTools |
---|
A, AC, AC, CPOS, CR, D, DC, defDoublesAsUse, definedIn, F, FC, getCondMoveOp, getDefaultOperand, getLoadOp, getLoadOp, getMoveOp, getStoreOp, getStoreOp, I, IC, insertInstructionsAfter, L, LC, makeBlockOnEdge, mayBeVolatileFieldLoad, moveInstruction, moveIntoRegister, moveIntoRegister, nonPEIGC, TG, usedIn, useDoublesAsDef |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean LOWER_ARRAY_ACCESS
private static BranchOptimizations branchOpts
Constructor Detail |
---|
public ConvertToLowLevelIR()
Method Detail |
---|
static void convert(IR ir, OptOptions options)
ir
- IR to convertstatic Instruction tableswitch(Instruction s, IR ir)
s
- the instruction to expandir
- the containing IR
static Instruction lookup(Instruction switchInstr, IR ir)
switchInstr
- The instruction to expandir
- The containing IR
Instruction
after the generated LIR sequence.private static BasicBlock _lookupswitchHelper(Instruction switchInstr, RegisterOperand reg, BasicBlock defaultBB, IR ir, BasicBlock curBlock, int low, int high, int min, int max)
switchInstr
- the lookupswitch instructiondefaultBB
- the basic block of the default caseir
- the ir objectcurBlock
- the basic block to insert instructions intoreg
- the RegisterOperand that contains the valued being switched onlow
- the low index of cases (operands of switchInstr)high
- the high index of cases (operands of switchInstr)min
- max
-
public static void doArrayLoad(Instruction s, IR ir, Operator op, int logwidth)
s
- the instruction to expandir
- the containing IRop
- the load operator to uselogwidth
- the log base 2 of the element type's sizepublic static void doArrayStore(Instruction s, IR ir, Operator op, int logwidth)
s
- the instruction to expandir
- the containing IRop
- the store operator to uselogwidth
- the log base 2 of the element type's sizestatic Instruction callHelper(Instruction v, IR ir)
v
- the call instructionir
- the containing IR
private static Instruction resolveMember(Instruction s, IR ir)
s
- the RESOLVE_MEMBER instruction to expandir
- the containing ir object
public static RegisterOperand insertBinary(Instruction s, IR ir, Operator operator, TypeReference type, Operand o1, Operand o2)
s
- the instruction to insert beforeir
- the containing IRoperator
- the operator to inserttype
- the type of the resulto1
- the first operando2
- the second operand
static RegisterOperand InsertUnary(Instruction s, IR ir, Operator operator, TypeReference type, Operand o1)
s
- the instruction to insert beforeir
- the containing IRoperator
- the operator to inserttype
- the type of the resulto1
- the operand
static RegisterOperand InsertGuardedUnary(Instruction s, IR ir, Operator operator, TypeReference type, Operand o1, Operand guard)
s
- the instruction to insert beforeir
- the containing IRoperator
- the operator to inserttype
- the type of the resulto1
- the operandguard
- the guard operand
static RegisterOperand InsertLoadOffsetJTOC(Instruction s, IR ir, Operator operator, TypeReference type, Offset offset)
s
- the instruction to insert beforeir
- the containing IRoperator
- the operator to inserttype
- the type of the resultoffset
- the offset to load at
static RegisterOperand InsertLoadOffsetJTOC(Instruction s, IR ir, Operator operator, TypeReference type, Operand offset)
s
- the instruction to insert beforeir
- the containing IRoperator
- the operator to inserttype
- the type of the resultoffset
- the offset to load at
static RegisterOperand InsertLoadOffset(Instruction s, IR ir, Operator operator, TypeReference type, Operand reg2, Offset offset)
s
- the instruction to insert beforeir
- the containing IRoperator
- the operator to inserttype
- the type of the resultreg2
- the base to load fromoffset
- the offset to load at
static RegisterOperand InsertLoadOffset(Instruction s, IR ir, Operator operator, TypeReference type, Operand reg2, Offset offset, Operand guard)
s
- the instruction to insert beforeir
- the containing IRoperator
- the operator to inserttype
- the type of the resultreg2
- the base to load fromoffset
- the offset to load atguard
- the guard operand
static RegisterOperand InsertLoadOffset(Instruction s, IR ir, Operator operator, TypeReference type, Operand reg2, Offset offset, LocationOperand loc, Operand guard)
s
- the instruction to insert beforeir
- the containing IRoperator
- the operator to inserttype
- the type of the resultreg2
- the base to load fromoffset
- the offset to load atloc
- the location operandguard
- the guard operand
static RegisterOperand InsertLoadOffset(Instruction s, IR ir, Operator operator, TypeReference type, Operand reg2, Operand offset, LocationOperand loc, Operand guard)
s
- the instruction to insert beforeir
- the containing IRoperator
- the operator to inserttype
- the type of the resultreg2
- the base to load fromoffset
- the offset to load atloc
- the location operandguard
- the guard operand
static Operand getTIB(Instruction s, IR ir, Operand obj, Operand guard)
static Operand getTIB(Instruction s, IR ir, RVMType type)
static Operand getTIB(Instruction s, IR ir, TypeOperand type)
static RegisterOperand getInstanceMethod(Instruction s, IR ir, Operand tib, RVMMethod method)
public static RegisterOperand getField(Instruction s, IR ir, RegisterOperand obj, RVMField field)
s
- ir
- obj
- field
- static RegisterOperand getField(Instruction s, IR ir, RegisterOperand obj, RVMField field, Operand guard)
s
- ir
- obj
- field
- guard
- static RegisterOperand getSpecialMethod(Instruction s, IR ir, int smid)
public static void expandSysCallTarget(Instruction s, IR ir)
public static RegisterOperand getStatic(Instruction s, IR ir, RVMField field)
s
- ir
- field
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |