public abstract class IREnumeration extends Object
It simply serves as a place to collect the implementation of primitive IR enumerations.
None of these functions are meant to be called directly from anywhere except IR, Instruction, and BasicBlock.
General clients should use the higher level interfaces provided by those classes.
Modifier and Type | Class and Description |
---|---|
static class |
IREnumeration.AllDefsEnum
This class implements an
Enumeration of Operand s. |
static class |
IREnumeration.AllInstructionsEnum
This class implements an enumeration of instructions over
all instructions for a basic block.
|
static class |
IREnumeration.AllUsesEnum
This class implements an
Enumeration of Operand . |
Constructor and Description |
---|
IREnumeration() |
Modifier and Type | Method and Description |
---|---|
private static void |
fail(String msg) |
static Enumeration<BasicBlock> |
forwardBE(IR ir)
A forward enumeration of all the basic blocks in the IR.
|
static Enumeration<Instruction> |
forwardGlobalIE(IR ir)
A forward enumeration of all the instructions in the IR.
|
static Enumeration<Instruction> |
forwardIntraBlockIE(Instruction start,
Instruction end)
Forward intra basic block instruction enumerations from
from start...last inclusive.
|
static Enumeration<BasicBlock> |
reverseBE(IR ir)
A reverse enumeration of all the basic blocks in the IR.
|
static Enumeration<Instruction> |
reverseGlobalIE(IR ir)
A reverse enumeration of all the instructions in the IR.
|
static Enumeration<Instruction> |
reverseIntraBlockIE(Instruction start,
Instruction end)
Reverse intra basic block instruction enumerations from
from start...last inclusive.
|
public IREnumeration()
public static Enumeration<Instruction> forwardIntraBlockIE(Instruction start, Instruction end)
NB: start and last _must_ be in the same basic block and must be in the proper relative order. This code does _not_ check this invariant, and will simply fail by eventually thowing a NoSuchElementException if it is not met. Caller's must be sure the invariants are met.
start
- the instruction to start withend
- the instruction to end withpublic static Enumeration<Instruction> reverseIntraBlockIE(Instruction start, Instruction end)
NB: start and last _must_ be in the same basic block and must be in the proper relative order. This code does _not_ check this invariant, and will simply fail by eventually thowing a NoSuchElementException if it is not met. Caller's must be sure the invariants are met.
start
- the instruction to start withend
- the instruction to end withpublic static Enumeration<Instruction> forwardGlobalIE(IR ir)
ir
- the IR to walk overpublic static Enumeration<Instruction> reverseGlobalIE(IR ir)
ir
- the IR to walk overpublic static Enumeration<BasicBlock> forwardBE(IR ir)
ir
- the IR to walk overpublic static Enumeration<BasicBlock> reverseBE(IR ir)
ir
- the IR to walk overprivate static void fail(String msg) throws NoSuchElementException
NoSuchElementException