Package | Description |
---|---|
cfg | |
opt |
Modifier and Type | Class and Description |
---|---|
class |
BinaryAddInst
A class representing a three-address code binary integer addition instruction
(BinaryAddInst).
|
class |
BinaryAndInst
A class representing a three-address code binary boolean AND instruction
(BinaryAndInst).
|
class |
BinaryDivInst
A class representing a three-address code binary integer division instruction
(BinaryDivInst).
|
class |
BinaryInst
A generic class representing a three-address code binary instruction
(BinaryInst).
|
class |
BinaryModInst
A class representing a three-address code binary integer modulus instruction
(BinaryModInst).
|
class |
BinaryMulInst
A class representing a three-address code binary integer multiplication
instruction
(BinaryMulInst).
|
class |
BinaryOrInst
A class representing a three-address code binary boolean OR instruction
(BinaryOrInst).
|
class |
BinarySubInst
A class representing a three-address code binary integer subtraction
instruction
(BinarySubInst).
|
class |
CallInst
A generic class representing a three-address code call instruction
(CallInst).
|
class |
DirCallInst
A class representing a three-address code indirect call instruction
(DirCallInst).
|
class |
ErrParamInst
A class representing a three-address code error parameter instruction
(ErrParamInst).
|
class |
IfInst
A class representing a three-address code if instruction (IfInst).
|
class |
InDirCallInst
A class representing a three-address code indirect call instruction
(InDirCallInst).
|
class |
LoadAddrInst
A class representing a three-address code load address instruction
(LoadAddrInst).
|
class |
LoadConstInst
A class representing a three-address code load constant instruction
(LoadConstInst).
|
class |
LoadEntryInst
A class representing a three-address code load entry instruction
(LoadEntryInst), which loads an entry from an indexable variable
or string constant.
|
class |
LoadInst
A generic class representing a three-address code load instruction
(LoadInst).
|
class |
LoadVarInst
A class representing a three-address code load variable (move) instruction
(LoadVarInst).
|
class |
ParamInst
A generic class representing a three-address code parameter instruction
(ParamInst).
|
class |
PhiInst
A class representing a three-address code Phi instruction (BinaryPhiInst).
|
class |
RefParamInst
A class representing a three-address code reference parameter instruction
(RefParamInst).
|
class |
ReturnInst
A class representing a three-address code return instruction (ReturnInst).
|
class |
StdParamInst
A class representing a three-address code parameter instruction
(StdParamInst).
|
class |
StoreEntryInst
A class representing a three-address code store entry instruction
(StoreEntryInst), which stores a value an entry from an indexable
variable or string constant.
|
class |
UnaryInst
A generic class representing a three-address code unary instruction
(UnaryInst).
|
class |
UnaryNegInst
A class representing a three-address code unary integer negation instruction
(UnaryNegInst).
|
class |
UnaryNotInst
A class representing a three-address code unary boolean not (complement)
instruction
(UnaryNotInst).
|
Modifier and Type | Method and Description |
---|---|
TACInst |
BasicBlock.getNthInst(int n)
Get the nth instruction
Note: throws an exception if there aren't at least n+1 instructions
|
Modifier and Type | Method and Description |
---|---|
java.util.List<TACInst> |
BasicBlock.getInstructions()
Returns a collection with the instructions in this block.
|
Modifier and Type | Method and Description |
---|---|
void |
BasicBlock.addInst(TACInst inst)
Append instruction into basic block
Throws exception if attempting to place an instruction after
an IF (which should terminate block)
|
void |
BasicBlock.addInst(TACInst inst,
int n)
Add instruction into specified place in the basic block
Shifts instructions at specified position to the right one
Throws exception if n is greater than the size or attempt
to place an instruction after an IF (which should terminate block)
|
void |
BasicBlock.addInstAfter(TACInst ins_inst,
TACInst after_inst)
Adds inst1 after inst2.
|
void |
BasicBlock.addInstAtEndBeforeIf(TACInst inst1)
Inserts given instruction at end of block, before any if-instruction.
|
void |
BasicBlock.addInstBefore(TACInst inst1,
TACInst inst2)
Adds inst1 before inst2.
|
int |
BasicBlock.getIndexOf(TACInst inst)
Returns the index of inst in block, or -1 if not found.
|
int |
BasicBlock.indexOf(TACInst inst)
Get the index of some instruction
|
void |
BasicBlock.removeInst(TACInst inst)
Removes given instruction from block (if found).
|
void |
BasicBlock.setNthInst(int n,
TACInst inst)
Set the nth instruction -- replaces the previous nth instruction
with the specified instruction
Note: throws an exception if there aren't at least n+1 instructions
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
Optimizer.getDestination(TACInst inst)
Gets the destination of an instruction or null if none
|
static java.lang.String |
Optimizer.getOperand1(TACInst inst)
Gets the first operand of an instruction or null if none
|
static java.lang.String |
Optimizer.getOperand2(TACInst inst)
Gets the second operand of an instruction or null if none
|
static java.util.Set<java.lang.String> |
Optimizer.getSources(TACInst inst)
Returns new a set with all variables used by given instruction.
|
static java.util.Set<java.lang.String> |
Optimizer.getSources(TACInst inst,
java.util.Set<java.lang.String> in)
Returns a set with all variables used by given instruction; if
in is not null, it will be used to store result (not cleared).
|