Modifier and Type | Method and Description |
---|---|
(package private) static RegisterOperand |
CounterArrayManager.InsertALoadOffset(Instruction s,
IR ir,
Operator operator,
TypeReference type,
Operand reg2,
int offset)
Insert array load off before s in the instruction stream.
|
void |
CounterArrayManager.mutateOptEventCounterInstruction(Instruction counterInst,
IR ir)
Take an event counter instruction and mutate it into IR
instructions that will do the actual counting.
|
Modifier and Type | Method and Description |
---|---|
private static void |
InstrumentationSamplingFramework.adjustPointersInDuplicatedCode(IR ir,
HashMap<BasicBlock,BasicBlock> origToDupMap)
Go through all blocks in duplicated code and adjust the edges as
follows:
All edges (in duplicated code) that go into a block with a
yieldpoint must jump to back to the original code.
|
private void |
InstrumentationSamplingFramework.appendLoad(BasicBlock bb,
IR ir)
Append a load of the global counter to the given basic block.
|
private void |
InstrumentationSamplingFramework.cleanUp(IR ir)
Cleans up the IR after the transformation is applied.
|
private void |
InstrumentationSamplingFramework.conditionalizeInstrumentationOperation(IR ir,
Instruction i,
BasicBlock bb)
Take an instrumentation operation (an instruction) and guard it
with a counter-based check.
|
private void |
InstrumentationSamplingFramework.createCheck(BasicBlock checkBB,
BasicBlock noInstBB,
BasicBlock instBB,
boolean fallthroughToInstBB,
IR ir)
Append a check to a basic block, and make it jump to the right places.
|
static void |
InstrumentationSamplingFramework.dumpCFG(IR ir) |
private void |
InstrumentationSamplingFramework.duplicateCode(IR ir,
HashMap<BasicBlock,BasicBlock> origToDupMap,
HashSet<BasicBlock> exceptionHandlerBlocks)
Make a duplicate of all basic blocks down at the bottom of the
code order.
|
private static RegisterOperand |
InstrumentationSamplingFramework.getOrCreateDupReg(RegisterOperand ro,
IR ir,
Map<Register,Register> dupMappings)
The given register a) does not span multiple basic block, and b)
is used in a basic block that is being duplicated.
|
private void |
InstrumentationSamplingFramework.insertCBSChecks(IR ir,
HashMap<BasicBlock,BasicBlock> origToDupMap,
HashSet<BasicBlock> exceptionHandlerBlocks)
In the checking code, insert CBS checks at each yieldpoint, to
transfer code into the duplicated (instrumented) code.
|
(package private) static void |
LowerInstrumentation.lowerInstrumentation(IR ir)
Actually perform the lowering
|
private static BasicBlock |
InstrumentationSamplingFramework.myCopyWithoutLinks(BasicBlock bb,
IR ir)
The same as BasicBlock.copyWithoutLinks except that it
renames all temp variables that are never used outside the basic
block.
|
CompilerPhase |
LowerInstrumentation.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
InsertInstructionCounters.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
InsertMethodInvocationCounter.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
InsertYieldpointCounters.newExecution(IR ir)
Return this instance of this phase.
|
void |
LowerInstrumentation.perform(IR ir)
Finds all instrumented instructions and calls the appropriate code to
convert it into the real sequence of instrumentation instructions.
|
void |
InstrumentationSamplingFramework.perform(IR ir) |
void |
InsertInstructionCounters.perform(IR ir)
Insert a counter on every instruction, and group counts by
opcode type.
|
void |
InsertMethodInvocationCounter.perform(IR ir)
Insert basic block counters
|
void |
InsertYieldpointCounters.perform(IR ir)
counters after all yieldpoint instructions
|
private void |
InstrumentationSamplingFramework.performVariationFullDuplication(IR ir)
Perform the full duplication algorithm
|
private void |
InstrumentationSamplingFramework.performVariationNoDuplication(IR ir)
Perform the NoDuplication version of the framework (see
Arnold-Ryder PLDI 2001).
|
private void |
InstrumentationSamplingFramework.prependCounterReset(BasicBlock bb,
IR ir)
Prepend the code to reset the global counter to the given basic
block.
|
private void |
InstrumentationSamplingFramework.prependDecrement(BasicBlock bb,
IR ir)
Append a decrement of the global counter to the given basic block.
|
private void |
InstrumentationSamplingFramework.prependStore(BasicBlock bb,
IR ir)
Append a store of the global counter to the given basic block.
|
private static void |
InstrumentationSamplingFramework.removeInstrumentationFromOrig(IR ir,
HashMap<BasicBlock,BasicBlock> origToDupMap)
Remove instrumentation from the original version of all duplicated
basic blocks.
|
private static void |
InstrumentationSamplingFramework.updateTemps(BasicBlock bb,
IR ir)
Given an basic block, rename all of the temporary registers that are
local to the block.
|
Modifier and Type | Method and Description |
---|---|
(package private) static void |
Simple.arrayPropagation(IR ir)
Perform flow-insensitive propagation to eliminate bounds checks
and arraylength for arrays with static lengths.
|
private void |
LocalCSE.checkHelper(IR ir,
LocalCSE.AvExCache cache,
Instruction inst)
Process a check instruction
|
static void |
DefUse.clearDU(IR ir)
Clear defList, useList for an IR.
|
static void |
DefUse.computeDU(IR ir)
Compute the register list and def-use lists for a method.
|
static void |
Simple.copyPropagation(IR ir)
Perform flow-insensitive copy and constant propagation using
register list information.
|
(package private) static void |
Simple.eliminateDeadInstructions(IR ir)
Simple conservative dead code elimination.
|
static void |
Simple.eliminateDeadInstructions(IR ir,
boolean preserveImplicitSSA)
Simple conservative dead code elimination.
|
private void |
LocalCSE.expressionHelper(IR ir,
LocalCSE.AvExCache cache,
Instruction inst)
Process a unary or binary expression.
|
(package private) void |
Simple.foldConstants(IR ir)
Perform constant folding.
|
private void |
LocalCSE.loadHelper(IR ir,
LocalCSE.AvExCache cache,
Instruction inst)
Process a load instruction
|
static void |
DefUse.mergeRegisters(IR ir,
Register reg1,
Register reg2)
Merges a register into another register and removes the
merged register from the DU information.
|
abstract void |
InstrumentedEventCounterManager.mutateOptEventCounterInstruction(Instruction i,
IR ir)
Take an event counter instruction and mutate it into IR instructions that
will do the actual counting.
|
CompilerPhase |
MutateSplits.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
LocalCastOptimization.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
AdjustBranchProbabilities.newExecution(IR ir) |
CompilerPhase |
LocalCopyProp.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
FieldAnalysis.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
LocalConstantProp.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
NullCheckCombining.newExecution(IR ir)
Return this instance of this phase.
|
private void |
LocalCSE.optimizeBasicBlockHIR(IR ir,
BasicBlock bb)
Perform Local CSE for a basic block in HIR.
|
private void |
LocalCSE.optimizeBasicBlockLIR(IR ir,
BasicBlock bb)
Perform Local CSE for a basic block in LIR.
|
void |
MutateSplits.perform(IR ir)
The main entrypoint for this pass.
|
void |
Simple.perform(IR ir)
Main driver for the simple optimizations
|
void |
LocalCastOptimization.perform(IR ir)
Main routine: perform the transformation.
|
void |
AdjustBranchProbabilities.perform(IR ir)
Simplistic adjustment of branch probabilities.
|
void |
LocalCopyProp.perform(IR ir)
Perform local constant propagation for a method.
|
void |
LocalCSE.perform(IR ir)
Perform Local CSE for a method.
|
static void |
ExpressionFolding.perform(IR ir)
Perform the transformation.
|
void |
FieldAnalysis.perform(IR ir)
Record field analysis information for an IR.
|
void |
LocalConstantProp.perform(IR ir)
Perform Local Constant propagation for a method.
|
void |
NullCheckCombining.perform(IR ir)
Perform nullcheck combining and validation register removal.
|
static boolean |
ExpressionFolding.performLocal(IR ir)
Perform expression folding on individual basic blocks.
|
private boolean |
LocalCastOptimization.pushTypeCheckBelowIf(Instruction s,
IR ir)
Where legal, move a type check below an if instruction.
|
static void |
DefUse.recomputeSpansBasicBlock(IR ir)
Recompute spansBasicBlock flags for all registers.
|
static void |
DefUse.recomputeSSA(IR ir)
Recompute
isSSA for all registers by traversing register
list. |
(package private) void |
Simple.simplifyConstantBranches(IR ir)
Simplify branches whose operands are constants.
|
private static void |
Simple.sortCommutativeRegisterUses(IR ir)
Sort commutative use operands so that those defined most are on the lhs
|
private static void |
LocalCSE.typeCheckHelper(IR ir,
LocalCSE.AvExCache cache,
Instruction inst)
Process a type check instruction
|
(package private) static void |
Simple.typePropagation(IR ir)
Perform flow-insensitive type propagation using register list
information.
|
Modifier and Type | Method and Description |
---|---|
private void |
OsrPointConstructor.collectOsrPointsAndBarriers(IR ir)
Iterates over all instructions in the IR and builds a list of
OsrPoint instructions and OsrBarrier instructions.
|
private void |
OsrPointConstructor.fixupCFGForOsr(IR ir)
Splits each OsrPoint, and connects it to the exit point.
|
CompilerPhase |
ConvertBCtoHIR.newExecution(IR ir) |
void |
OsrPointConstructor.perform(IR ir)
Goes through each instruction, reconstruct OsrPoint instructions.
|
void |
ConvertBCtoHIR.perform(IR ir)
Generate HIR for ir.method into IR
|
private void |
OsrPointConstructor.removeOsrBarriers(IR ir) |
private void |
OsrPointConstructor.renovateOsrPoints(IR ir)
For each OsrPoint instruction, traces its OsrBarriers created by
inlining. rebuild OsrPoint instruction to hold all necessary
information to recover from inlined activation.
|
private void |
OsrPointConstructor.verifyNoOsrBarriers(IR ir) |
Modifier and Type | Field and Description |
---|---|
private IR |
AnnotatedLSTNode.ir
A pointer to the governing IR
|
private IR |
DominatorTree.ir
The governing IR
|
private IR |
LTDominators.ir |
(package private) IR |
DominatorCell.ir
Pointer to the governing IR.
|
private IR |
EstimateBlockFrequencies.ir
The IR on which to operate.
|
private IR |
DominatorSystem.ir
The governing IR.
|
private IR |
LSTGraph.ir |
Modifier and Type | Method and Description |
---|---|
protected void |
LTDominators.analyze(IR ir) |
protected boolean |
BranchOptimizationDriver.applyPeepholeBranchOpts(IR ir)
This pass performs peephole branch optimizations.
|
private static boolean |
BranchOptimizationDriver.applySimplify(IR ir)
Perform branch simplifications.
|
static void |
LTDominators.approximate(IR ir,
boolean forward)
Compute approximate dominator/post dominator without unfactoring
exception handlers.
|
private void |
LTDominators.checkReachability(IR ir)
Checks that all nodes were reached.
|
void |
Dominators.computeApproxDominators(IR ir)
Calculate the "approximate" dominators for an IR i.e., the
dominators in the factored CFG rather than the normal CFG.
|
void |
Dominators.computeApproxPostdominators(IR ir)
Calculate the postdominators for an IR.
|
private void |
EstimateBlockFrequencies.computeInfrequentBlocks(IR ir)
Compute which blocks are infrequent.
|
(package private) BasicBlock |
LoopUnrolling.copyAndLinkBlock(IR ir,
BasicBlock seqLast,
BasicBlock block) |
private void |
BranchOptimizations.doCondMove(IR ir,
Diamond diamond,
Instruction cb)
Perform the transformation to replace conditional branch with a
sequence using conditional moves.
|
(package private) Enumeration<BasicBlock> |
DominatorTreeNode.domFrontierEnumerator(IR ir)
Enumerate the basic blocks in the dominance frontier for this node.
|
BitVector |
LTDominatorInfo.dominators(BasicBlock block,
IR ir)
This method returns the set of blocks that dominates the passed
block, i.e., it answers the question "Who dominates me?"
|
(package private) BitVector |
DominatorTreeNode.dominators(IR ir)
This method returns the set of blocks that dominates the passed
block, i.e., it answers the question "Who dominates me?"
|
private void |
ReorderingPhase.doPettisHansenAlgo2(IR ir)
Reorder code using Algo2 (Bottom-Up Positioning) from
Pettis and Hansen PLDI'90.
|
(package private) static void |
AnnotatedLSTNode.dumpInstruction(IR ir,
Instruction instr)
Dump a human readable description of an instruction within a
basic block within the loop
|
private static void |
CFGTransformations.ensureLandingPad(LSTNode n,
IR ir) |
private static void |
CFGTransformations.ensureLandingPads(IR ir) |
private static void |
CFGTransformations.ensureLandingPads(LSTNode t,
IR ir) |
private void |
ReorderingPhase.exileInfrequentBlocks(IR ir)
Select a new basic block ordering via a simple heuristic
that moves all infrequent basic blocks to the end.
|
private boolean |
BranchOptimizations.generateBooleanCompare(IR ir,
BasicBlock bb,
Instruction cb,
BasicBlock tb)
Attempt to generate a boolean compare opcode from a conditional branch.
|
private boolean |
BranchOptimizations.generateCondMove(IR ir,
BasicBlock bb,
Instruction cb)
Attempt to generate a straight-line sequence using conditional move
instructions, to replace a diamond control flow structure.
|
static BitVector |
DominanceFrontier.getDominanceFrontier(IR ir,
BitVector bits)
Calculate the dominance frontier for the set of basic blocks
represented by a BitVector.
|
static BasicBlock |
LTDominatorInfo.getIdom(BasicBlock bb,
IR ir)
return the immediate dominator of a basic block.
|
static LTDominatorInfo |
LTDominatorInfo.getInfo(BasicBlock block,
IR ir)
Helper method to return the Info field associated with a block
|
static BitVector |
DominanceFrontier.getIteratedDominanceFrontier(IR ir,
BitVector S)
Calculate the iterated dominance frontier for a set of basic blocks
represented by a BitVector.
|
(package private) static String |
AnnotatedLSTNode.instructionToString(IR ir,
Instruction instr)
Converts instruction to String in of AnnotatedLSTNode format.
|
static boolean |
LTDominatorInfo.isDominatedBy(BasicBlock block,
BasicBlock master,
IR ir)
This method determines if the 1st parameter (block) is dominated by
the 2nd parameter (master), i.e., must control pass through "master"
before reaching "block"
|
(package private) boolean |
TailRecursionElimination.isTailRecursion(Instruction call,
IR ir)
Is the argument call instruction a tail recursive call?
|
(package private) static void |
CFGTransformations.killFallThroughs(IR ir,
BitVector nloop) |
(package private) BasicBlock[] |
LoopUnrolling.makeSomeCopies(int unrollFactor,
IR ir,
BitVector nloop,
int blocks,
BasicBlock header,
BasicBlock exitBlock,
BasicBlock seqStart) |
protected void |
BranchOptimizationDriver.maximizeBasicBlocks(IR ir)
Merge adjacent basic blocks
|
private void |
LoopUnrolling.naiveUnroller(LSTNode t,
IR ir) |
CompilerPhase |
YieldPoints.newExecution(IR ir)
This phase contains no per-compilation instance fields.
|
CompilerPhase |
StaticSplitting.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
BuildLST.newExecution(IR ir)
This phase contains no per-compilation instance fields.
|
CompilerPhase |
TailRecursionElimination.newExecution(IR ir) |
CompilerPhase |
DominanceFrontier.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
BranchOptimizationDriver.newExecution(IR ir)
This phase contains no per-compilation instance fields.
|
CompilerPhase |
ReorderingPhase.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
CFGTransformations.newExecution(IR ir)
Return this instance of this phase.
|
protected boolean |
MIRBranchOptimizations.optimizeBranchInstruction(IR ir,
Instruction s,
BasicBlock bb)
This method actually does the work of attempting to
peephole optimize a branch instruction.
|
protected boolean |
BranchOptimizations.optimizeBranchInstruction(IR ir,
Instruction s,
BasicBlock bb)
This method actually does the work of attempting to
peephole optimize a branch instruction.
|
protected abstract boolean |
BranchOptimizationDriver.optimizeBranchInstruction(IR ir,
Instruction s,
BasicBlock bb)
This method actually does the work of attempting to
peephole optimize a branch instruction.
|
void |
LoopUnrolling.perform(IR ir) |
void |
YieldPoints.perform(IR ir)
Insert yield points in method prologues, loop heads, and method exits
|
void |
Dominators.perform(IR ir)
Calculate the dominators for an IR.
|
void |
DominatorsPhase.perform(IR ir)
Main driver for the dominator calculation.
|
void |
StaticSplitting.perform(IR ir)
Do simplistic static splitting to create hot traces
with that do not have incoming edges from
blocks that are statically predicted to be cold.
|
void |
PostDominatorsPhase.perform(IR ir)
Main driver for the post-dominator calculation.
|
void |
EstimateBlockFrequencies.perform(IR _ir)
Compute relative basic block frequencies for the argument IR based on the
branch probability information on each conditional and multiway branch.
|
void |
LoopAnalysis.perform(IR ir) |
void |
DominatorTreePhase.perform(IR ir) |
void |
BuildLST.perform(IR ir)
Build the Loop Structure Tree (LST) for the given IR.
|
void |
TailRecursionElimination.perform(IR ir)
Perform tail recursion elimination.
|
static void |
AnnotatedLSTGraph.perform(IR ir)
The main entry point
|
void |
DominanceFrontier.perform(IR ir)
Calculate the dominance frontier for each basic block in the
CFG.
|
static void |
LSTGraph.perform(IR ir)
The main entry point
|
void |
BranchOptimizationDriver.perform(IR ir)
Perform peephole branch optimizations.
|
void |
ReorderingPhase.perform(IR ir)
Reorder basic blocks either by trivially moving infrequent blocks
to the end of the code order or by applying Pettis and Hansen Algo2.
|
void |
CFGTransformations.perform(IR ir) |
static void |
DominatorTree.perform(IR ir,
boolean forward)
Build a dominator tree from an IR.
|
void |
BranchOptimizationDriver.perform(IR ir,
boolean renumber) |
static void |
LTDominators.perform(IR ir,
boolean forward,
boolean unfactor)
The entry point for this phase
|
void |
Dominators.printDominators(IR ir)
Print the (already calculated) dominators.
|
private void |
LTDominators.printResults(IR ir)
Print the nodes that dominate each basic block
|
private boolean |
MIRBranchOptimizations.processCondBranch(IR ir,
Instruction cb,
BasicBlock bb)
Perform optimizations for a conditional branch.
|
private boolean |
BranchOptimizations.processConditionalBranch(IR ir,
Instruction cb,
BasicBlock bb)
Perform optimizations for a conditional branch.
|
private boolean |
MIRBranchOptimizations.processGoto(IR ir,
Instruction g,
BasicBlock bb)
Perform optimizations for an unconditonal branch.
|
private boolean |
BranchOptimizations.processGoto(IR ir,
Instruction g,
BasicBlock bb)
Perform optimizations for a Goto.
|
(package private) static boolean |
BranchSimplifier.processIfCmp(IR ir,
BasicBlock bb,
Instruction s) |
(package private) static boolean |
BranchSimplifier.processIfCmp2(IR ir,
BasicBlock bb,
Instruction s) |
(package private) static boolean |
BranchSimplifier.processInlineGuard(IR ir,
BasicBlock bb,
Instruction s) |
private boolean |
BranchOptimizations.processInlineGuard(IR ir,
Instruction cb,
BasicBlock bb)
Perform optimizations for an inline guard.
|
(package private) static boolean |
BranchSimplifier.processLookupSwitch(IR ir,
BasicBlock bb,
Instruction s) |
(package private) static boolean |
BranchSimplifier.processTableSwitch(IR ir,
BasicBlock bb,
Instruction s) |
private boolean |
MIRBranchOptimizations.processTwoTargetConditionalBranch(IR ir,
Instruction cb,
BasicBlock bb)
Perform optimizations for a two way conditional branch.
|
private boolean |
BranchOptimizations.processTwoTargetConditionalBranch(IR ir,
Instruction cb,
BasicBlock bb)
Perform optimizations for a two way conditional branch.
|
protected boolean |
BranchOptimizationDriver.removeUnreachableCode(IR ir)
Remove unreachable code
|
private void |
BranchOptimizations.rewriteWithTemporaries(Instruction[] set,
IR ir)
For each in a set of instructions, rewrite every def to use a new
temporary register.
|
private void |
LSTGraph.setDepth(IR ir,
LSTNode node,
int depth) |
private void |
EstimateBlockFrequencies.setDumbFrequencies(IR ir)
Set the frequency of each basic block to 1.0f.
|
void |
DominatorCell.setTOP(IR ir)
Include all basic blocks in this set.
|
private void |
StaticSplitting.simpleCandidateSearch(IR ir)
Identify candidate blocks by using a very
simplistic algorithm.
|
static boolean |
BranchSimplifier.simplify(BasicBlock bb,
IR ir)
Given a basic block, attempt to simplify any conditional branch
instructions with constant operands.
|
private void |
StaticSplitting.splitCandidate(StaticSplitting.CandInfo ci,
IR ir)
Splits a node where we can safely not
replicate the on-branch in the cloned node.
|
static void |
CFGTransformations.splitCriticalEdges(IR ir)
Critical edge removal: if (a,b) is an edge in the cfg where `a' has more
than one out-going edge and `b' has more than one in-coming edge,
insert a new empty block `c' on the edge between `a' and `b'.
|
(package private) static void |
CFGTransformations.staticPerform(IR ir) |
(package private) Instruction |
TailRecursionElimination.transform(Instruction call,
Instruction prologue,
BasicBlock target,
IR ir)
Transform the tail recursive call into a loop.
|
private static boolean |
CFGTransformations.turnLoopIntoUntil(LSTNode n,
IR ir)
Transforms a given loop.
|
private static boolean |
CFGTransformations.turnLoopTreeIntoUntils(LSTNode t,
IR ir) |
private static boolean |
CFGTransformations.turnWhilesIntoUntils(IR ir) |
(package private) boolean |
LoopUnrolling.unrollLeaf(LSTNode t,
IR ir) |
(package private) void |
LoopUnrolling.unrollLoops(IR ir) |
(package private) int |
LoopUnrolling.unrollLoopTree(LSTNode t,
IR ir,
int target) |
Constructor and Description |
---|
AnnotatedLSTGraph(IR ir,
LSTGraph graph)
Constructor
|
AnnotatedLSTNode(IR ir,
LSTNode node)
Constructor
|
DominatorCell(BasicBlock bb,
IR ir)
Make a bit set for a basic block
|
DominatorSystem(IR ir)
Default constructor.
|
DominatorTree(IR ir,
boolean forward)
Build a dominator tree from an IR.
|
LSTGraph(IR ir)
Constructor, it creates the LST graph
|
LTDominators(IR ir,
boolean forward)
The constructor, called by the perform method
|
Modifier and Type | Field and Description |
---|---|
private IR |
DepGraph.ir
The IR we are processing
|
Modifier and Type | Method and Description |
---|---|
static void |
DepGraphStats.printBasicBlockStatistics(IR ir)
Print the dependence graph stats for all basic blocks in an IR.
|
Constructor and Description |
---|
DepGraph(IR ir,
Instruction start,
Instruction end,
BasicBlock currentBlock)
Constructor (computes the dependence graph!).
|
Modifier and Type | Field and Description |
---|---|
private IR |
CFGVisualization.ir |
Modifier and Type | Method and Description |
---|---|
IR |
CompilationPlan.execute()
Execute a compilation plan by executing each element
in the optimization plan.
|
Modifier and Type | Method and Description |
---|---|
private String |
CFGVisualization.determineFileName(IR ir,
String tag,
RVMMethod method) |
protected void |
CFGVisualization.dfsCFG(BasicBlock bb,
IR ir) |
static void |
CompilerPhase.dumpIR(IR ir,
String tag)
Prints the IR, optionally including the CFG
|
static void |
CompilerPhase.dumpIR(IR ir,
String tag,
boolean forceCFG)
Prints the IR, optionally including the CFG
|
CompilerPhase |
IRPrinter.newExecution(IR ir)
Return this instance of this phase
|
CompilerPhase |
CompilerPhase.newExecution(IR ir)
This method is called immediately before performPhase.
|
void |
IRPrinter.perform(IR ir)
Print an IR
|
void |
OptimizationPlanAtomicElement.perform(IR ir) |
void |
OptimizationPlanCompositeElement.perform(IR ir) |
abstract void |
CompilerPhase.perform(IR ir)
This is the method that actually does the work of the phase.
|
abstract void |
OptimizationPlanElement.perform(IR ir)
Do the work represented by this element in the optimization plan.
|
void |
CompilerPhase.performPhase(IR ir)
Runs a phase by calling perform on the supplied IR surrounded by
printing/messaging/debugging glue.
|
static void |
OptimizingCompiler.printInstructions(IR ir,
String message)
Prints the IR along with a message.
|
void |
CompilerPhase.verify(IR ir)
Verify the IR.
|
Constructor and Description |
---|
CFGVisualization(IR ir,
String tag) |
Modifier and Type | Field and Description |
---|---|
private IR |
ObjectReplacer.ir
the IR
|
private IR |
ShortArrayReplacer.ir
the governing IR
|
Modifier and Type | Method and Description |
---|---|
private static void |
SimpleEscape.assertThatTypeIsNotNull(IR ir,
RegisterOperand useOrDef) |
private static SimpleEscape.AnalysisResult |
SimpleEscape.checkAllAppearances(Register reg,
IR ir)
Checks all appearances of a register, to see if any instruction in
this method causes the object pointed to by the register to escape
this thread and/or method.
|
private static boolean |
SimpleEscape.checkEscapesMethod(RegisterOperand use,
IR ir,
Set<Register> visited)
Checks a single use, to see if this use may cause the object
referenced to escape from this method.
|
private static boolean |
SimpleEscape.checkEscapesThread(RegisterOperand use,
IR ir,
Set<Register> visited)
Checks a single use, to see if this use may cause the object
referenced to escape from this thread.
|
private static boolean |
SimpleEscape.checkIfUseEscapesMethod(Register reg,
IR ir,
Set<Register> visited) |
private static boolean |
SimpleEscape.checkIfUseEscapesThread(Register reg,
IR ir,
Set<Register> visited) |
private static boolean |
ShortArrayReplacer.containsUnsupportedUse(IR ir,
Register reg,
int size,
RVMArray vmArray,
Set<Register> visited)
Some cases we don't handle yet.
|
private static boolean |
ObjectReplacer.containsUnsupportedUse(IR ir,
Register reg,
RVMClass klass,
Set<Register> visited)
Some cases we don't handle yet.
|
private AggregateReplacer |
EscapeTransformations.getAggregateReplacer(Instruction inst,
IR ir)
Generate an object which will perform scalar replacement of
an aggregate allocated by a given instruction
PRECONDITION: objects returned by this allocation site do NOT escape
the current method
|
static UnsyncReplacer |
UnsyncReplacer.getReplacer(Instruction inst,
IR ir)
Generate an instance of this class for a particular
instantiation site.
|
static ObjectReplacer |
ObjectReplacer.getReplacer(Instruction inst,
IR ir)
Return an object representing this transformation for a given
allocation site
|
static ShortArrayReplacer |
ShortArrayReplacer.getReplacer(Instruction inst,
IR ir)
Returns an object representing this transformation for a given
allocation site.
|
private UnsyncReplacer |
EscapeTransformations.getUnsyncReplacer(Register reg,
Instruction inst,
IR ir)
Generate an object which transforms defs & uses of "synchronized"
objects to defs & uses of "unsynchronized" objects
PRECONDITION: objects pointed to by reg do NOT escape
|
private static Iterator<Operand> |
SimpleEscape.iterateReturnValues(IR ir)
TODO: Move this utility elsewhere
|
CompilerPhase |
EscapeTransformations.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
SimpleEscape.newExecution(IR ir)
Return this instance of this phase.
|
void |
EscapeTransformations.perform(IR ir)
Perform the transformations
|
void |
SimpleEscape.perform(IR ir) |
FI_EscapeSummary |
SimpleEscape.simpleEscapeAnalysis(IR ir)
Performs the escape analysis for a method.
|
Constructor and Description |
---|
ObjectReplacer(Register r,
RVMClass _klass,
IR i) |
ShortArrayReplacer(Register r,
RVMArray a,
int s,
IR i) |
Modifier and Type | Method and Description |
---|---|
private static BasicBlock |
ConvertToLowLevelIR._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
|
private static BasicBlock |
DynamicTypeCheckExpansion.advanceBlock(int bcIndex,
BasicBlock curBlock,
IR ir) |
(package private) static Instruction |
DynamicTypeCheckExpansion.arrayStoreCheck(Instruction s,
IR ir,
boolean couldBeNull)
Expand an object array store check into the LIR sequence that
implements it.
|
(package private) static Instruction |
ConvertToLowLevelIR.callHelper(Instruction v,
IR ir)
Helper method for call expansion.
|
(package private) static Instruction |
DynamicTypeCheckExpansion.checkcast(Instruction s,
IR ir)
Expand a checkcast instruction into the LIR sequence that implements the
dynamic type check, raising a ClassCastException when the type check
fails.
|
(package private) static Instruction |
DynamicTypeCheckExpansion.checkcastNotNull(Instruction s,
IR ir)
Expand a checkcast instruction into the LIR sequence that implements the
dynamic type check, raising a ClassCastException when the type check
fails.
|
(package private) static void |
ConvertToLowLevelIR.convert(IR ir,
OptOptions options)
Converts the given HIR to LIR.
|
private static Instruction |
DynamicTypeCheckExpansion.convertToBranchingTypeCheck(Instruction s,
IR ir,
Operand RHSobj,
TypeReference LHStype,
Operand RHStib,
RegisterOperand result)
Generate wrapper around branching type check to get a
value producing type check.
|
static void |
ConvertToLowLevelIR.doArrayLoad(Instruction s,
IR ir,
Operator op,
int logwidth)
Expand an array load.
|
static void |
ConvertToLowLevelIR.doArrayStore(Instruction s,
IR ir,
Operator op,
int logwidth)
Expand an array store.
|
static void |
ConvertToLowLevelIR.expandSysCallTarget(Instruction s,
IR ir)
Expand symbolic SysCall target into a chain of loads from the bootrecord to
the desired target address.
|
private static BasicBlock |
DynamicTypeCheckExpansion.fallThroughBB(Instruction s,
IR ir) |
private static Instruction |
DynamicTypeCheckExpansion.generateBranchingTypeCheck(Instruction s,
IR ir,
Operand RHSobj,
TypeReference LHStype,
Operand RHStib,
BasicBlock trueBlock,
BasicBlock falseBlock,
RegisterOperand oldGuard,
BranchProfileOperand falseProb)
Generate a branching dynamic type check.
|
private static Instruction |
DynamicTypeCheckExpansion.generateValueProducingTypeCheck(Instruction s,
IR ir,
Operand RHSobj,
TypeReference LHStype,
Operand RHStib,
RegisterOperand result)
Generate a value-producing dynamic type check.
|
static RegisterOperand |
ConvertToLowLevelIR.getField(Instruction s,
IR ir,
RegisterOperand obj,
RVMField field) |
(package private) static RegisterOperand |
ConvertToLowLevelIR.getField(Instruction s,
IR ir,
RegisterOperand obj,
RVMField field,
Operand guard) |
(package private) static RegisterOperand |
ConvertToLowLevelIR.getInstanceMethod(Instruction s,
IR ir,
Operand tib,
RVMMethod method) |
(package private) static RegisterOperand |
ConvertToLowLevelIR.getSpecialMethod(Instruction s,
IR ir,
int smid) |
static RegisterOperand |
ConvertToLowLevelIR.getStatic(Instruction s,
IR ir,
RVMField field) |
(package private) static Operand |
ConvertToLowLevelIR.getTIB(Instruction s,
IR ir,
Operand obj,
Operand guard) |
(package private) static Operand |
ConvertToLowLevelIR.getTIB(Instruction s,
IR ir,
RVMType type) |
(package private) static Operand |
ConvertToLowLevelIR.getTIB(Instruction s,
IR ir,
TypeOperand type) |
private void |
ExpandRuntimeServices.inline(Instruction inst,
IR ir) |
private void |
ExpandRuntimeServices.inline(Instruction inst,
IR ir,
boolean noCalleeExceptions) |
static RegisterOperand |
ConvertToLowLevelIR.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 |
ConvertToLowLevelIR.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 |
ConvertToLowLevelIR.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 |
ConvertToLowLevelIR.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 |
ConvertToLowLevelIR.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 |
ConvertToLowLevelIR.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 |
ConvertToLowLevelIR.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 |
ConvertToLowLevelIR.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 |
ConvertToLowLevelIR.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 |
DynamicTypeCheckExpansion.instanceOf(Instruction s,
IR ir)
Expand an instanceof instruction into the LIR sequence that implements
the dynamic type check.
|
(package private) static Instruction |
DynamicTypeCheckExpansion.instanceOfNotNull(Instruction s,
IR ir)
Expand an instanceof instruction into the LIR sequence that implements
the dynamic type check.
|
(package private) static Instruction |
ConvertToLowLevelIR.lookup(Instruction switchInstr,
IR ir)
Expand a lookupswitch.
|
(package private) static Instruction |
DynamicTypeCheckExpansion.mustImplementInterface(Instruction s,
IR ir)
Expand a checkcastInterface instruction into the LIR sequence that
implements the dynamic type check, raising an IncompataibleClassChangeError
if the type check fails.
|
CompilerPhase |
ConvertHIRtoLIR.newExecution(IR ir) |
void |
ConvertHIRtoLIR.perform(IR ir) |
void |
ExpandRuntimeServices.perform(IR ir)
Given an HIR, expand operators that are implemented as calls to
runtime service methods.
|
private void |
ExpandRuntimeServices.primitiveArrayStoreHelper(RVMMethod target,
Instruction inst,
IR ir)
Helper method to generate call to primitive arrayStore write barrier
|
private void |
ExpandRuntimeServices.primitiveObjectFieldStoreHelper(RVMMethod target,
Instruction inst,
IR ir,
FieldReference fieldRef)
Helper method to generate call to primitive putfield write barrier
|
private static Instruction |
ConvertToLowLevelIR.resolveMember(Instruction s,
IR ir)
Generate the code to resolve a member (field/method) reference.
|
(package private) static Instruction |
ConvertToLowLevelIR.tableswitch(Instruction s,
IR ir)
Expand a tableswitch.
|
Modifier and Type | Method and Description |
---|---|
static void |
Inliner.execute(InlineDecision inlDec,
IR ir,
Instruction callSite)
Execute an inlining decision inlDec for the CALL instruction
callSite that is contained in ir.
|
Modifier and Type | Method and Description |
---|---|
abstract IR |
GenericPhysicalRegisterTools.getIR() |
Modifier and Type | Method and Description |
---|---|
BasicBlock |
BasicBlock.copyWithoutLinks(IR ir)
Copies a basic block.
|
BasicBlock |
BasicBlock.createSubBlock(int bc,
IR ir) |
BasicBlock |
BasicBlock.createSubBlock(int bc,
IR ir,
float wf)
Creates a new basic block that inherits its exception handling,
etc from 'this'.
|
static Enumeration<Register> |
GenericPhysicalDefUse.enumerate(int code,
IR ir) |
static Enumeration<Register> |
GenericPhysicalDefUse.enumerateAllImplicitDefUses(IR ir) |
static Enumeration<BasicBlock> |
IREnumeration.forwardBE(IR ir)
A forward enumeration of all the basic blocks in the IR.
|
static Enumeration<Instruction> |
IREnumeration.forwardGlobalIE(IR ir)
A forward enumeration of all the instructions in the IR.
|
static BasicBlock |
IRTools.makeBlockOnEdge(BasicBlock in,
BasicBlock out,
IR ir)
Make an empty basic block on an edge in the control flow graph,
and fix up the control flow graph and IR instructions accordingly.
|
boolean |
BasicBlock.mergeFallThrough(IR ir)
If this block has a single non-Exception successor in the CFG
then we may be able to merge the two blocks together.
|
void |
BasicBlock.moveBehind(BasicBlock pred,
IR ir)
Move me behind `pred'.
|
(package private) void |
BasicBlock.pruneExceptionalOut(IR ir)
Prune away exceptional out edges that are not reachable given this
block's instructions.
|
void |
BasicBlock.recomputeNormalOut(IR ir)
Recompute the normal out edges of 'this' based on the
semantics of the branch instructions in the block.
|
void |
BasicBlock.redirectOuts(BasicBlock b,
BasicBlock bCopy,
IR ir)
Change all branches from this to b to branches that go to bCopy instead.
|
void |
BasicBlock.replicateNormalOut(IR ir)
For each basic block b which is a "normal" successor of this,
make a copy of b, and set up the CFG so that this block has
normal out edges to the copies.
|
BasicBlock |
BasicBlock.replicateThisOut(IR ir,
BasicBlock b)
For basic block b which has to be a "normal" successor of this,
make a copy of b, and set up the CFG so that this block has
normal out edges to the copy.
|
BasicBlock |
BasicBlock.replicateThisOut(IR ir,
BasicBlock b,
BasicBlock pred)
For basic block b which has to be a "normal" successor of this,
make a copy of b, and set up the CFG so that this block has
normal out edges to the copy.
|
static Enumeration<BasicBlock> |
IREnumeration.reverseBE(IR ir)
A reverse enumeration of all the basic blocks in the IR.
|
static Enumeration<Instruction> |
IREnumeration.reverseGlobalIE(IR ir)
A reverse enumeration of all the instructions in the IR.
|
void |
MachineSpecificIR.rewriteFPStack(IR ir) |
BasicBlock |
BasicBlock.segregateInstruction(Instruction target,
IR ir)
Ensure that the target instruction is the only real instruction
in its basic block and that it has exactly one successor and
one predecessor basic blocks that are linked to it by fall through edges.
|
BasicBlock |
BasicBlock.splitNodeAt(Instruction last_instr_BB1,
IR ir)
Splits a node at an instruction point.
|
BasicBlock |
BasicBlock.splitNodeWithLinksAt(Instruction last_instr_BB1,
IR ir)
Splits a node at an instruction point.
|
(package private) void |
BasicBlock.unfactor(IR ir)
Convert a block in the FCFG into the equivalent set of
CFG blocks by splitting the original block into sub-blocks
at each PEI that reaches at least one exception handelr.
|
Constructor and Description |
---|
AllDefsEnum(IR ir,
Instruction instr)
Construct/initialize object
|
AllInstructionsEnum(IR ir,
BasicBlock block)
Construct an enumeration for all instructions, both implicit and
explicit in the IR, for a given basic block
|
AllUsesEnum(IR ir,
Instruction instr)
Construct/initialize object
|
BitSetBBEnum(IR ir,
BitVector bits) |
HIRInfo(IR ir) |
LIRInfo(IR ir) |
MIRInfo(IR ir) |
Modifier and Type | Method and Description |
---|---|
abstract IR |
PhysicalRegisterTools.getIR() |
Modifier and Type | Method and Description |
---|---|
static PhysicalDefUse.PDUEnumeration |
PhysicalDefUse.enumerate(int code,
IR ir) |
static PhysicalDefUse.PDUEnumeration |
PhysicalDefUse.enumerateAllImplicitDefUses(IR ir) |
Constructor and Description |
---|
PDUEnumeration(int c,
IR ir) |
Modifier and Type | Method and Description |
---|---|
static PhysicalDefUse.PDUEnumeration |
PhysicalDefUse.enumerate(int code,
IR ir) |
static PhysicalDefUse.PDUEnumeration |
PhysicalDefUse.enumerateAllImplicitDefUses(IR ir) |
Constructor and Description |
---|
PDUEnumeration(int c,
IR ir) |
Modifier and Type | Field and Description |
---|---|
IR |
BURS.ir |
Modifier and Type | Method and Description |
---|---|
IR |
BURS_Common_Helpers.getIR() |
Modifier and Type | Method and Description |
---|---|
private void |
ConvertLIRtoMIR.ReduceOperators.expandSysCall(Instruction s,
IR ir) |
CompilerPhase |
SplitBasicBlock.newExecution(IR ir) |
CompilerPhase |
ConvertLIRtoMIR.ReduceOperators.newExecution(IR ir) |
CompilerPhase |
ConvertLIRtoMIR.NormalizeConstantsPhase.newExecution(IR ir) |
CompilerPhase |
ConvertLIRtoMIR.DoLiveness.newExecution(IR ir) |
CompilerPhase |
ConvertLIRtoMIR.DoBURS.newExecution(IR ir) |
CompilerPhase |
ConvertLIRtoMIR.ComplexOperators.newExecution(IR ir) |
CompilerPhase |
ConvertLIRtoMIR.InsertIMMQ_MOVForX64.newExecution(IR ir) |
void |
SplitBasicBlock.perform(IR ir) |
void |
ConvertLIRtoMIR.ReduceOperators.perform(IR ir) |
void |
ConvertLIRtoMIR.NormalizeConstantsPhase.perform(IR ir) |
void |
ConvertLIRtoMIR.DoLiveness.perform(IR ir) |
void |
ConvertLIRtoMIR.DoBURS.perform(IR ir) |
void |
ConvertLIRtoMIR.ComplexOperators.perform(IR ir) |
void |
ConvertLIRtoMIR.InsertIMMQ_MOVForX64.perform(IR ir) |
(package private) BasicBlock |
SplitBasicBlock.splitEachBlock(BasicBlock bb,
IR ir)
Splits a basic block.
|
void |
ConvertLIRtoMIR.DoBURS.verify(IR ir) |
Constructor and Description |
---|
BURS(IR ir) |
MinimalBURS(IR ir)
Create a BURS object for the given IR.
|
NormalBURS_DepGraph(IR ir,
Instruction start,
Instruction end,
BasicBlock currentBlock) |
NormalBURS(IR ir)
Create a BURS object for the given IR.
|
Modifier and Type | Method and Description |
---|---|
private static void |
ComplexLIR2MIRExpansion.basic_long_ifcmp(Instruction s,
IR ir,
ConditionOperand cond,
Register xh,
Register xl,
Operand yh,
Operand yl) |
static void |
ComplexLIR2MIRExpansion.convert(IR ir)
Converts the given IR to low level IA32 IR.
|
private static Instruction |
ComplexLIR2MIRExpansion.double_2int(Instruction s,
IR ir) |
private static Instruction |
ComplexLIR2MIRExpansion.double_2long(Instruction s,
IR ir) |
private static Instruction |
ComplexLIR2MIRExpansion.float_2int(Instruction s,
IR ir) |
private static Instruction |
ComplexLIR2MIRExpansion.float_2long(Instruction s,
IR ir) |
private static Instruction |
ComplexLIR2MIRExpansion.long_ifcmp_imm(Instruction s,
IR ir) |
private static Instruction |
ComplexLIR2MIRExpansion.long_ifcmp(Instruction s,
IR ir) |
private static Instruction |
ComplexLIR2MIRExpansion.long_mul(Instruction s,
IR ir) |
private static Instruction |
ComplexLIR2MIRExpansion.long_shl(Instruction s,
IR ir) |
private static Instruction |
ComplexLIR2MIRExpansion.long_shr(Instruction s,
IR ir) |
private static Instruction |
ComplexLIR2MIRExpansion.long_ushr(Instruction s,
IR ir) |
CompilerPhase |
ConvertALUOperators.newExecution(IR ir)
Return this instance of this phase.
|
void |
ConvertALUOperators.perform(IR ir) |
static void |
NormalizeConstants.perform(IR ir)
Only thing we do for IA32 is to restrict the usage of
String, Float, and Double constants.
|
private static PhysicalRegisterSet |
ComplexLIR2MIRExpansion.phys(IR ir) |
static void |
ComplexLIR2MIRExpansion.process64BitImmediateValues(IR ir) |
Modifier and Type | Method and Description |
---|---|
private void |
LiveAnalysis.computeBlockGenAndKill(BasicBlock bblock,
IR ir)
Compute summary (local) live variable analysis for a basic block, which
is basically Gen and Kill information.
|
private void |
LiveAnalysis.computeRegisterMap(IR ir)
Sets up a mapping from each register to the set of live intervals for
the register.
|
private void |
LiveAnalysis.debugBegining(IR ir,
boolean createGCMaps,
boolean dumpFixedPointResults,
boolean dumpFinalMaps,
boolean dumpFinalLiveIntervals)
Just a helper method to encapsulate the optional debugging info
that is performed at the beginning of the perform method
|
private void |
LiveAnalysis.debugPostGlobal(IR ir,
boolean dumpFixedPointResults,
boolean dumpFinalMaps,
boolean dumpFinalLiveIntervals)
Just a helper method to encapsulate the optional debugging info
that is performed after the global propagation step of "perform"
|
private boolean |
LiveAnalysis.isSkippableReg(RegisterOperand regOp,
IR ir)
Should this register be included in the liveness solution?
|
void |
LiveAnalysis.perform(IR ir)
The entry point into this class
Perform live variable analysis on this IR, constructing live
range info and (optionally) GC map info as we go.
|
private void |
LiveAnalysis.performLocalPropagation(IR ir,
boolean createGCMaps)
This method performs the last phase of the analysis, local propagation.
|
private void |
LiveAnalysis.printFinalLiveIntervals(IR ir)
Prints the Final Live Intervals
|
private void |
LiveAnalysis.printFinalMaps(IR ir) |
private void |
LiveAnalysis.printFixedPointResults(IR ir)
Prints the results of the fixed point computation.
|
private boolean |
LiveAnalysis.processBlock(BasicBlock block,
boolean reuseCurrentSet,
IR ir)
Computes the in set for this block given the out, gen, and kill set
|
Modifier and Type | Method and Description |
---|---|
CompilerPhase |
AssemblerDriver.newExecution(IR ir) |
CompilerPhase |
FinalMIRExpansionDriver.newExecution(IR ir) |
void |
AssemblerDriver.perform(IR ir) |
void |
FinalMIRExpansionDriver.perform(IR ir) |
void |
AssemblerDriver.verify(IR ir) |
Modifier and Type | Field and Description |
---|---|
protected IR |
AssemblerBase.ir |
Modifier and Type | Method and Description |
---|---|
static int |
FinalMIRExpansion.expand(IR ir) |
private static void |
FinalMIRExpansion.expandFClear(Instruction s,
IR ir)
expand an FCLEAR pseudo-insruction using FFREEs.
|
private static void |
FinalMIRExpansion.expandUnconditionalYieldpoint(Instruction s,
IR ir,
RVMMethod meth) |
private static void |
FinalMIRExpansion.expandYieldpoint(Instruction s,
IR ir,
RVMMethod meth,
IA32ConditionOperand ypCond) |
Constructor and Description |
---|
AssemblerBase(int bytecodeSize,
boolean shouldPrint,
IR ir)
Construct Assembler object
|
AssemblerOpt(int bcSize,
boolean print,
IR ir) |
Modifier and Type | Field and Description |
---|---|
protected IR |
GenericStackManager.ir |
private IR |
SpillLocationManager.ir
The governing IR
|
private IR |
ActiveSet.ir
Governing ir
|
private IR |
IntervalAnalysis.ir
the governing ir
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
BlockCountSpillCost.calculate(IR ir) |
(package private) abstract void |
SpillCostEstimator.calculate(IR ir)
Calculates the estimated cost for each register.
|
(package private) void |
BrainDeadSpillCost.calculate(IR ir)
Calculates the estimated cost for each register.
|
(package private) void |
SimpleSpillCost.calculate(IR ir) |
void |
GenericStackManager.computeRestrictions(IR ir)
Sets up register restrictions.
|
private ActiveSet |
LinearScanPhase.createEmptySetOfActiveIntervals(IR ir) |
private SpillCostEstimator |
LinearScanPhase.determineSpillCostEstimator(IR ir) |
void |
GenericRegisterRestrictions.init(IR ir)
Records all the register restrictions dictated by an IR.
|
abstract void |
GenericStackManager.initForArch(IR ir)
Perform some architecture-specific initialization.
|
abstract void |
GenericRegisterPreferences.initialize(IR ir)
Sets up register preferences for an IR.
|
CompilerPhase |
UpdateOSRMaps.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
SpillCode.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
PrologueEpilogueCreator.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
CoalesceMoves.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
UpdateGCMaps2.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
RegisterAllocator.RegisterAllocPreparation.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
ExpandCallingConvention.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
RegisterRestrictionsPhase.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
UpdateGCMaps1.newExecution(IR ir)
Return this instance of this phase.
|
void |
UpdateOSRMaps.perform(IR ir)
Iterate over the IR-based OSR map, and update symbolic registers
with real reg number or spill locations.
|
void |
SpillCode.perform(IR ir) |
void |
PrologueEpilogueCreator.perform(IR ir)
Insert the prologue and epilogue
|
void |
LinearScanPhase.perform(IR ir)
Perform the linear scan register allocation algorithm.
|
void |
CoalesceMoves.perform(IR ir) |
void |
UpdateGCMaps2.perform(IR ir) |
void |
RegisterAllocator.RegisterAllocPreparation.perform(IR ir) |
void |
ExpandCallingConvention.perform(IR ir) |
void |
RegisterRestrictionsPhase.perform(IR ir) |
void |
UpdateGCMaps1.perform(IR ir)
Iterate over the IR-based GC map collection and for each entry
replace the symbolic reg with the real reg or spill it was allocated
|
void |
IntervalAnalysis.perform(IR ir)
compute live intervals for this ir
the result is a sorted (by beginning point) set of compound
intervals, stored in the private 'intervals' field.
|
void |
GenericStackManager.prepare(IR ir)
Called as part of the register allocator startup.
|
(package private) void |
RegisterAllocatorState.printDfns(IR ir)
Prints the DFN numbers associated with each instruction.
|
private static void |
SpillCode.replaceSymbolicRegisters(IR ir)
Iterates over the IR and replace each symbolic register with its
allocated physical register.
|
(package private) void |
RegisterAllocatorState.resetPhysicalRegisters(IR ir)
Resets the physical register info.
|
private void |
SpillCode.rewriteFPStack(IR ir)
Rewrites floating point registers to reflect changes in stack
height induced by BURS.
|
(package private) void |
UpdateOSRMaps.setRealPosition(IR ir,
LocalRegPair tuple,
Register sym_reg) |
Constructor and Description |
---|
ActiveSet(IR ir,
SpillLocationManager sm,
SpillCostEstimator cost) |
BlockCountSpillCost(IR ir) |
BrainDeadSpillCost(IR ir) |
SimpleSpillCost(IR ir) |
SpillLocationManager(IR ir) |
Modifier and Type | Method and Description |
---|---|
static void |
CallingConvention.allocateSpaceForSysCall(IR ir)
We have to save/restore the non-volatile registers around syscalls,
to protect ourselves from malicious C compilers and Linux kernels.
|
private static void |
CallingConvention.callExpand(Instruction call,
IR ir)
Expands the calling convention for a particular call instruction.
|
private static void |
RewriteMemoryOperandsWithOversizedDisplacements.disp64MemOperandConversion(IR ir,
Instruction inst,
MemoryOperand mo) |
static void |
CallingConvention.expandCallingConventions(IR ir)
Expands calling conventions to make physical registers explicit in the
IR when required for calls, returns, and the prologue.
|
private static int |
CallingConvention.expandParametersToCall(Instruction call,
IR ir)
Explicitly copy parameters to a call into the appropriate physical
registers as defined by the calling convention.
|
private static int |
CallingConvention.expandParametersToSysCall(Instruction call,
IR ir)
Explicitly copy parameters to a system call into the appropriate physical
registers as defined by the calling convention.
|
private static void |
CallingConvention.expandPrologue(IR ir) |
private static void |
CallingConvention.expandResultOfCall(Instruction call,
boolean isSysCall,
IR ir)
Explicitly copy the result of a call instruction from the result
register to the appropriate symbolic register,
as defined by the calling convention.
|
static void |
CallingConvention.expandSysCall(Instruction s,
IR ir)
Calling convention to implement calls to native (C) routines
using the Linux linkage conventions.
|
private static RegisterOperand |
MIRSplitRanges.findOrCreateTemp(RegisterOperand rOp,
HashMap<Register,Register> map,
IR ir)
Finds or creates a temporary register to cache a symbolic register.
|
void |
StackManager.initForArch(IR ir)
Initialize some architecture-specific state needed for register
allocation.
|
void |
RegisterPreferences.initialize(IR ir) |
CompilerPhase |
RewriteMemoryOperandsWithOversizedDisplacements.newExecution(IR ir) |
CompilerPhase |
MIRSplitRanges.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
ExpandFPRStackConvention.newExecution(IR ir)
Return this instance of this phase.
|
void |
RewriteMemoryOperandsWithOversizedDisplacements.perform(IR ir) |
void |
MIRSplitRanges.perform(IR ir)
The main method.
|
void |
ExpandFPRStackConvention.perform(IR ir)
Insert the needed dummy defs and uses.
|
(package private) static void |
CallingConvention.restoreNonvolatilesAfterSysCall(Instruction call,
IR ir)
Restore all nonvolatile registers after a syscall.
|
private static void |
CallingConvention.returnExpand(Instruction ret,
IR ir)
Expands the calling convention for a particular return instruction.
|
static void |
CallingConvention.saveNonvolatilesAroundSysCall(Instruction call,
IR ir)
Save and restore all nonvolatile registers around a syscall.
|
(package private) static void |
CallingConvention.saveNonvolatilesBeforeSysCall(Instruction call,
IR ir)
Save all nonvolatile registers before a syscall.
|
private static void |
MIRSplitRanges.splitAllLiveRanges(Instruction s,
HashMap<Register,Register> newMap,
IR ir,
boolean rootOnly)
Split the live ranges of all register operands of an instruction
|
Modifier and Type | Method and Description |
---|---|
private static int |
OptExceptionTable.countExceptionTableSize(IR ir) |
(package private) static OptMachineCodeMap |
OptMachineCodeMap.create(IR ir,
int machineCodeSize)
Creates the map, called during compilation
|
void |
OptCompiledMethod.createCodePatchMaps(IR ir)
Create the code patching maps from the IR for the method
|
void |
OptCompiledMethod.createFinalExceptionTable(IR ir)
Create the final exception table from the IR for the method.
|
void |
OptCompiledMethod.createFinalMCMap(IR ir,
int machineCodeLength)
Create the final machine code map for the compiled method.
|
void |
OptCompiledMethod.createFinalOSRMap(IR ir) |
(package private) static int[] |
OptExceptionTable.encode(IR ir)
Encode an exception table
|
Modifier and Type | Field and Description |
---|---|
private IR |
GlobalCSE.ir
Cache of IR being processed by this phase
|
private IR |
EnterSSA.ir
The governing IR
|
private IR |
IndexPropagationSystem.ir
The governing IR.
|
private IR |
LeaveSSA.ir
The IR to manipulate
|
private IR |
LICM.ir |
private IR |
LoopVersioning.ir
IR for optimisation
|
private IR |
SSADictionary.ir
A pointer to the governing IR
|
Modifier and Type | Method and Description |
---|---|
(package private) static void |
SSA.addAtEnd(IR ir,
BasicBlock bb,
Instruction c,
boolean exp)
Add a move instruction at the end of a basic block, renaming
with a temporary register if needed to protect conditional branches
at the end of the block.
|
private static void |
LiveRangeSplitting.LiveRangeSplittingPhase.addEntriesForInfrequentBlocks(IR ir,
LiveAnalysis live,
HashMap<LiveRangeSplitting.LiveRangeSplittingPhase.BasicBlockPair,HashSet<Register>> result)
Split live ranges on entry and exit to infrequent regions.
|
private void |
ValueGraph.addRegisterNodes(IR ir)
Add a node to the value graph for every symbolic register.
|
(package private) static void |
PiNodes.cleanUp(IR ir)
Change all PI nodes to INT_MOVE instructions
Side effect: invalidates SSA state
|
private void |
EnterSSA.computeSSA(IR ir,
boolean scalarsOnly,
boolean backwards,
Set<Object> heapTypes,
boolean insertUsePhis,
boolean insertPEIDeps,
boolean excludeGuards)
Calculate SSA form for an IR.
|
private void |
EnterSSA.copyHeapDefs(IR ir,
HashMap<Instruction,HeapOperand<?>[]> store)
Store a copy of the Heap variables each instruction defs.
|
(package private) static boolean |
LoadElimination.eliminateLoads(IR ir,
DF_Solution available)
Eliminates redundant loads with respect to prior defs and prior
uses.
|
private static HashMap<LiveRangeSplitting.LiveRangeSplittingPhase.BasicBlockPair,HashSet<Register>> |
LiveRangeSplitting.LiveRangeSplittingPhase.findSplitPoints(IR ir,
LiveAnalysis live,
LSTGraph lst)
Find the points the IR where live ranges should be split.
|
static HashSet<Object> |
LoadElimination.getCandidates(IR ir)
Do a quick pass over the IR, and return types that are candidates
for redundant load elimination.
|
(package private) void |
LICM.initialize(IR ir) |
private void |
EnterSSA.insertHeapPhiFunctions(IR ir)
Insert phi functions for heap array SSA heap variables.
|
private void |
EnterSSA.insertHeapVariables(IR ir,
boolean backwards)
Insert heap variables needed for Array SSA form.
|
private void |
EnterSSA.insertPhiFunctions(IR ir,
BitVector[] defs,
Register[] symbolics,
boolean excludeGuards)
Insert the necessary phi functions into an IR.
|
private void |
PiNodes.insertPiBcNodes(IR ir)
Insert Pi nodes for boundchecks.
|
private void |
PiNodes.insertPiCheckCastNodes(IR ir)
Insert Pi nodes for checkcast operations.
|
private void |
PiNodes.insertPiIfNodes(IR ir)
Insert PI nodes corresponding to compare operations.
|
private void |
PiNodes.insertPiNullCheckNodes(IR ir)
Insert Pi nodes for null check operations.
|
(package private) static Instruction |
SSA.makeMoveInstruction(IR ir,
Register r1,
ConstantOperand c)
Create a move instruction r1 := c.
|
(package private) static Instruction |
SSA.makeMoveInstruction(IR ir,
Register r1,
Register r2,
TypeReference t)
Create a move instruction r1 := r2.
|
CompilerPhase |
RedundantBranchElimination.EnsureSSA.newExecution(IR ir) |
CompilerPhase |
RedundantBranchElimination.RBE.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
LoadElimination.LoadEliminator.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
GCP.GCPPreparation.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
GCP.GCPFinalization.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
GlobalValueNumber.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
LiveRangeSplitting.LiveRangeSplittingPhase.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
LiveRangeSplitting.RenamePreparation.newExecution(IR ir)
Return this instance of this phase.
|
CompilerPhase |
SSATuneUp.FoldingDriver.newExecution(IR ir)
Return this instance of this phase.
|
private static void |
LeaveSSA.normalizeSSA(IR ir)
Avoid potential lost copy and other associated problems by
Sreedhar's naive translation from TSSA to CSSA.
|
void |
GlobalCSE.perform(IR ir)
Perform the GlobalCSE compiler phase
|
void |
RedundantBranchElimination.EnsureSSA.perform(IR ir) |
void |
RedundantBranchElimination.RBE.perform(IR ir)
Transform to eliminate redundant branches passed on
GVNs and dominator information.
|
static void |
UniformlyGeneratedGVN.perform(IR ir)
Compute Index Equivalence with uniformly generated global value
numbers.
|
void |
LoadElimination.LoadEliminator.perform(IR ir)
main driver for redundant load elimination
Preconditions: Array SSA form and Global Value Numbers computed
|
void |
LoadElimination.LoadEliminationPreparation.perform(IR ir) |
void |
LoadElimination.GVNPreparation.perform(IR ir) |
void |
GCP.GCPPreparation.perform(IR ir) |
void |
GCP.GCPFinalization.perform(IR ir) |
void |
GlobalValueNumber.perform(IR ir)
Main driver for global value number-related computations
PRECONDITION: Array SSA form
POSTCONDITION: ir.valueNumbers holds global value number state
|
void |
PiNodes.perform(IR ir) |
void |
EnterSSA.perform(IR ir)
Construct SSA form to satisfy the desired options in ir.desiredSSAOptions.
|
void |
IndexPropagation.perform(IR ir)
Perform the analysis.
|
void |
LiveRangeSplitting.LiveRangeSplittingPhase.perform(IR ir) |
void |
LiveRangeSplitting.RenamePreparation.perform(IR ir)
register in the IR the SSA properties we need for simple scalar
renaming
|
void |
LeaveSSA.perform(IR ir)
perform the main out-of-ssa transformation
|
void |
LICM.perform(IR ir)
Execute loop invariant code motion on the given IR.
|
void |
LoopVersioning.perform(IR _ir) |
void |
SSATuneUp.FoldingDriver.perform(IR ir)
Execute expression folding.
|
void |
SSATuneUp.TuneUpPreparation.perform(IR ir)
register in the IR the SSA properties we need for simple scalar
optimizations
|
(package private) boolean |
LICM.postDominates(BasicBlock a,
BasicBlock b,
IR ir)
does a post dominate b?
|
static void |
SSA.printInstructions(IR ir)
Print the instructions in SSA form.
|
private void |
EnterSSA.registerCalls(IR ir)
Register every CALL instruction in this method with the
implicit heap array SSA look aside structure.
|
private void |
EnterSSA.registerExits(IR ir)
Register every instruction that can leave this method with the
implicit heap array SSA look aside structure.
|
private void |
EnterSSA.registerHeapVariables(IR ir)
Register every instruction in this method with the
implicit heap array SSA lookaside structure.
|
private void |
EnterSSA.registerRenamedHeapPhis(IR ir)
After performing renaming on heap phi functions, this
routines notifies the SSA dictionary of the new names.
|
(package private) static void |
LeaveSSA.removeAllPhis(IR ir)
Remove all phi instructions from the IR.
|
private void |
RedundantBranchElimination.RBE.removeCondBranch(BasicBlock source,
Instruction cb,
IR ir,
Instruction di)
Remove cb from source, updating PHI nodes to maintain SSA form.
|
private void |
EnterSSA.removePhisThatDominateAllDefs(BitVector needsPhi,
IR ir,
BitVector defs)
If node N dominates all defs of a register r, then N does
not need a phi function for r; this function removes such
nodes N from a Bit Set.
|
private void |
RedundantBranchElimination.RBE.removeUnreachableCode(IR ir)
Remove unreachable code
|
private void |
EnterSSA.renameHeapVariables(IR ir)
Rename the implicit heap variables in the SSA form so that
each heap variable has only one definition.
|
(package private) static void |
LoadElimination.replaceDefs(IR ir,
LoadElimination.UseRecordSet UseRepSet,
HashMap<LoadElimination.UseRecord,Register> registers)
Perform scalar replacement actions for a Def of a heap variable.
|
(package private) static LoadElimination.UseRecordSet |
LoadElimination.replaceLoads(IR ir,
DF_Solution available,
HashMap<LoadElimination.UseRecord,Register> registers)
Walk over each instruction.
|
static boolean |
LICM.shouldMove(Instruction inst,
IR ir) |
private void |
RedundantBranchElimination.RBE.takeCondBranch(BasicBlock source,
Instruction cb,
IR ir)
Transforms a conditional branch into a GOTO, updating PHI nodes
to maintain SSA form.
|
(package private) static boolean |
GCP.tooBig(IR ir) |
private static void |
LiveRangeSplitting.LiveRangeSplittingPhase.transform(IR ir,
HashMap<LiveRangeSplitting.LiveRangeSplittingPhase.BasicBlockPair,HashSet<Register>> xform)
Perform the transformation
|
void |
LeaveSSA.translateFromSSA(IR ir)
Main driver to translate an IR out of SSA form.
|
private void |
LeaveSSA.unSSAGuards(IR ir)
Special treatment for guard registers:
Remove guard-phis by evaluating operands into same register.
|
private void |
LeaveSSA.unSSAGuardsDetermineReg(IR ir)
Determine target register for guard phi operands
|
private void |
LeaveSSA.unSSAGuardsFinalize(IR ir)
Rename registers and delete Phis.
|
private void |
LeaveSSA.unSSAGuardsInit(IR ir)
Initialization for removal of guard phis.
|
Constructor and Description |
---|
GlobalValueNumberState(IR ir)
Construct a structure to hold global value number results for an IR.
|
HeapVariable(T type,
int number,
IR ir)
Create a new Heap variable of a given type, with a given number.
|
IndexPropagationSystem(IR _ir)
Set up the system of dataflow equations.
|
SSADictionary(Set<Object> heapTypes,
boolean uphi,
boolean insertPEIDeps,
IR ir)
Initialize a structure to hold Heap Array SSA information.
|
ValueGraph(IR ir)
Construct a value graph from an IR.
|
Modifier and Type | Method and Description |
---|---|
CompilerPhase |
AdjustBCIndexes.newExecution(IR ir)
Return this instance of this phase.
|
void |
AdjustBCIndexes.perform(IR ir) |