org.jikesrvm.compilers.opt.lir2mir
Class MinimalBURS
java.lang.Object
org.jikesrvm.compilers.opt.lir2mir.BURS
org.jikesrvm.compilers.opt.lir2mir.MinimalBURS
final class MinimalBURS
- extends BURS
This class contains code for quick and dirty instruction selection
by forcing each instruction to be a tree and generating the trees in
the same input as the input LIR instructions.
This results in poor code quality, but can be done very quickly.
The intended purpose is to reduce compile time by doing quick and
dirty instruction selection for infrequently executed basic blocks.
- See Also:
ArchitectureSpecificOpt.BURS_STATE
,
ArchitectureSpecificOpt.BURS_TreeNode
Constructor Summary |
MinimalBURS(IR ir)
Create a BURS object for the given IR. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MinimalBURS
MinimalBURS(IR ir)
- Create a BURS object for the given IR.
- Parameters:
ir
- the IR to translate from LIR to MIR.
invoke
public void invoke(BasicBlock bb)
- Build BURS trees for dependence graph
bb
, label the trees, and
then generate MIR instructions based on the labeling.
- Parameters:
bb
- The dependence graph. XXX Is this correct?
buildTree
private ArchitectureSpecificOpt.BURS_TreeNode buildTree(Instruction s)
- Build a BURS Tree for each Instruction.
Complete BURS trees by adding leaf nodes as needed, and
creating tree edges by calling insertChild1() or insertChild2()
This step is also where we introduce intermediate tree nodes for
any LIR instruction that has > 2 "real" operands e.g., a CALL.
- Parameters:
s
- The instruction for which a tree must be built
generateTree
private void generateTree(ArchitectureSpecificOpt.BURS_TreeNode k,
ArchitectureSpecificOpt.BURS_STATE burs)
- Generates code for a single tree root.
- Parameters:
k
- the root to start generation atburs
-