public final class LIR extends LIRGenerator.VariableProvider
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_EXCEPTION_EDGE_OP_DISTANCE_FROM_END
The maximum distance an operation with an exception edge can be from the last instruction of a LIR block.
|
| Constructor and Description |
|---|
LIR(AbstractControlFlowGraph<?> cfg,
AbstractBlockBase<?>[] linearScanOrder,
OptionValues options,
DebugContext debug)
Creates a new LIR instance for the specified compilation.
|
| Modifier and Type | Method and Description |
|---|---|
AbstractBlockBase<?>[] |
codeEmittingOrder()
Gets the code emitting ordering of blocks as an array.
|
boolean |
codeEmittingOrderAvailable()
Checks whether the code emitting order has been computed.
|
AbstractBlockBase<?>[] |
getBlocks()
Gets an array of all the blocks in this LIR.
|
AbstractControlFlowGraph<?> |
getControlFlowGraph() |
DebugContext |
getDebug() |
static LabelRef |
getExceptionEdge(LIRInstruction op)
Gets the exception edge (if any) originating at a given operation.
|
ArrayList<LIRInstruction> |
getLIRforBlock(AbstractBlockBase<?> block) |
static AbstractBlockBase<?> |
getNextBlock(AbstractBlockBase<?>[] blocks,
int blockIndex)
Gets the next non-
null block in a list. |
OptionValues |
getOptions() |
boolean |
hasArgInCallerFrame()
Determines if any of the parameters to the method are passed via the stack where the
parameters are located in the caller's frame.
|
boolean |
hasDebugInfo()
Determines if any instruction in the LIR has debug info associated with it.
|
AbstractBlockBase<?>[] |
linearScanOrder()
Gets the linear scan ordering of blocks as an array.
|
void |
resetLabels() |
void |
setCodeEmittingOrder(AbstractBlockBase<?>[] codeEmittingOrder) |
void |
setHasArgInCallerFrame() |
void |
setLIRforBlock(AbstractBlockBase<?> block,
ArrayList<LIRInstruction> list) |
static boolean |
verifyBlock(LIR lir,
AbstractBlockBase<?> block) |
static boolean |
verifyBlocks(LIR lir,
AbstractBlockBase<?>[] blocks) |
numVariablespublic static final int MAX_EXCEPTION_EDGE_OP_DISTANCE_FROM_END
The rationale for such a constant is to limit the search for an insertion point when adding move operations at the end of a block. Such moves must be inserted before all control flow instructions.
public LIR(AbstractControlFlowGraph<?> cfg, AbstractBlockBase<?>[] linearScanOrder, OptionValues options, DebugContext debug)
public AbstractControlFlowGraph<?> getControlFlowGraph()
public OptionValues getOptions()
public DebugContext getDebug()
public boolean hasDebugInfo()
public ArrayList<LIRInstruction> getLIRforBlock(AbstractBlockBase<?> block)
public void setLIRforBlock(AbstractBlockBase<?> block, ArrayList<LIRInstruction> list)
public AbstractBlockBase<?>[] linearScanOrder()
null entries for blocks that have been optimized away.public AbstractBlockBase<?>[] codeEmittingOrder()
LIR.getBlocks() instead. The code emitting order
is computed late in the LIR pipeline; LIR.codeEmittingOrderAvailable() can be used to
check whether it has been computed. This method will throw an exception if the code emitting
order is not available.IllegalStateException - if the code emitting order is not
availablepublic void setCodeEmittingOrder(AbstractBlockBase<?>[] codeEmittingOrder)
public boolean codeEmittingOrderAvailable()
public AbstractBlockBase<?>[] getBlocks()
LIR.codeEmittingOrder() if available, otherwise it is
in LIR.linearScanOrder(). In either case it can contain null entries for blocks
that have been optimized away. The start block will always be at index 0.public void setHasArgInCallerFrame()
public boolean hasArgInCallerFrame()
public static AbstractBlockBase<?> getNextBlock(AbstractBlockBase<?>[] blocks, int blockIndex)
null block in a list.blocks - list of blocksblockIndex - index of the current blocknull or null if there is no
such blockpublic static LabelRef getExceptionEdge(LIRInstruction op)
public static boolean verifyBlock(LIR lir, AbstractBlockBase<?> block)
public static boolean verifyBlocks(LIR lir, AbstractBlockBase<?>[] blocks)
public void resetLabels()