public abstract class AbstractBURS_TreeNode extends Object
BURS
,
BURS_StateCoder
Modifier and Type | Field and Description |
---|---|
(package private) AbstractBURS_TreeNode |
child1 |
(package private) AbstractBURS_TreeNode |
child2 |
DepGraphNode |
dg_node
Dependence graph node corresponding to
interior node in BURS tree (set to null for
leaf node or for OTHER_OPERAND node).
|
private byte |
nonterminal
nonterminal > 0 ==> this tree node is the
root of a "supernode"; the value of nonterminal
identifies the matching non-terminal
nonterminal = 0 ==> this tree node is NOT the
root of a "supernode".
|
private char |
opcode
Opcode of instruction
|
private byte |
treeroot_registersused
trrr rrrr
t = tree root
r = num of registers used
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractBURS_TreeNode(char Opcode)
Constructor for leaf/auxiliary node.
|
protected |
AbstractBURS_TreeNode(DepGraphNode n)
Constructor for interior node.
|
Modifier and Type | Method and Description |
---|---|
static AbstractBURS_TreeNode |
create(char Opcode) |
static AbstractBURS_TreeNode |
create(DepGraphNode n) |
AbstractBURS_TreeNode |
getChild1() |
AbstractBURS_TreeNode |
getChild2() |
abstract char |
getCost(int goalNT) |
Instruction |
getInstruction() |
String |
getInstructionString() |
int |
getNonTerminal() |
char |
getOpcode() |
abstract void |
initCost() |
boolean |
isREGISTERNode() |
boolean |
isSuperNodeRoot() |
boolean |
isTreeRoot() |
int |
numRegisters() |
abstract int |
readPacked(int word,
int shift,
int mask) |
abstract int |
rule(int goalNT)
Get the BURS rule number associated with this tree node for a given non-terminal
|
void |
setChild1(AbstractBURS_TreeNode x) |
void |
setChild2(AbstractBURS_TreeNode x) |
abstract void |
setCost(int goalNT,
char cost) |
void |
setNonTerminal(int nonterminal) |
void |
setNumRegisters(int r) |
void |
setTreeRoot() |
String |
toString() |
abstract void |
writePacked(int word,
int mask,
int shiftedValue) |
AbstractBURS_TreeNode child1
AbstractBURS_TreeNode child2
public final DepGraphNode dg_node
private final char opcode
private byte nonterminal
private byte treeroot_registersused
trrr rrrr t = tree root r = num of registers used
protected AbstractBURS_TreeNode(DepGraphNode n)
n
- the dep graph nodeprotected AbstractBURS_TreeNode(char Opcode)
Opcode
- the opcode for the nodepublic final char getOpcode()
public final AbstractBURS_TreeNode getChild1()
public final void setChild1(AbstractBURS_TreeNode x)
public final AbstractBURS_TreeNode getChild2()
public final void setChild2(AbstractBURS_TreeNode x)
public final int getNonTerminal()
public final void setNonTerminal(int nonterminal)
public final boolean isTreeRoot()
public final void setTreeRoot()
public final void setNumRegisters(int r)
public final int numRegisters()
public final Instruction getInstruction()
public final String getInstructionString()
public static AbstractBURS_TreeNode create(DepGraphNode n)
n
- the dep graph nodepublic static AbstractBURS_TreeNode create(char Opcode)
Opcode
- the node's opcodepublic final boolean isSuperNodeRoot()
public final boolean isREGISTERNode()
public abstract int rule(int goalNT)
goalNT
- the non-terminal we want to know the rule for (e.g. stm_NT)public abstract char getCost(int goalNT)
public abstract void setCost(int goalNT, char cost)
public abstract void initCost()
public abstract void writePacked(int word, int mask, int shiftedValue)
public abstract int readPacked(int word, int shift, int mask)