public abstract class BURS extends Object
Modifier and Type | Field and Description |
---|---|
protected AbstractBURS_TreeNode |
AddressConstant |
protected AbstractBURS_TreeNode |
BranchTarget |
static boolean |
DEBUG |
IR |
ir |
protected Instruction |
lastInstr |
protected AbstractBURS_TreeNode |
LongConstant |
protected AbstractBURS_TreeNode |
NullTreeNode |
protected AbstractBURS_TreeNode |
Register |
Modifier and Type | Method and Description |
---|---|
(package private) static byte |
action(int rule) |
void |
append(Instruction instruction)
Appends an instruction, i.e. emits an MIR instruction.
|
(package private) static String |
debug(int rule) |
(package private) static void |
dumpTree(AbstractBURS_TreeNode tn)
Dumps the tree for debugging.
|
(package private) void |
finalizeBlock(BasicBlock bb)
Finalizes a block.
|
(package private) static void |
label(AbstractBURS_TreeNode tn)
Recursively labels the tree with costs.
|
(package private) BURS_StateCoder |
makeCoder() |
(package private) static void |
mark(AbstractBURS_TreeNode tn,
byte goalnt)
Traverses the tree, marking the non-terminal to be generated for each
sub-tree.
|
(package private) void |
prepareForBlock(BasicBlock bb)
Prepares for conversion of a block.
|
public static final boolean DEBUG
protected final AbstractBURS_TreeNode NullTreeNode
protected final AbstractBURS_TreeNode LongConstant
protected final AbstractBURS_TreeNode AddressConstant
protected final AbstractBURS_TreeNode Register
protected final AbstractBURS_TreeNode BranchTarget
protected Instruction lastInstr
BURS_StateCoder makeCoder()
static void label(AbstractBURS_TreeNode tn)
tn
- the tree to labelstatic void mark(AbstractBURS_TreeNode tn, byte goalnt)
tn
- the tree to traversegoalnt
- the goalstatic byte action(int rule)
rule
- the rule's numberstatic void dumpTree(AbstractBURS_TreeNode tn)
tn
- the root of the tree to be dumpedstatic String debug(int rule)
rule
- the rule's numberfinal void prepareForBlock(BasicBlock bb)
bb
- a basic blockfinal void finalizeBlock(BasicBlock bb)
bb
- a basic blockpublic final void append(Instruction instruction)
instruction
- the instruction to emit