public class InductionVarAnalyzer
extends java.lang.Object
To accomplish its tasks, InductionVarAnalyzer keeps track of a number of induction variables (represented by Swizzler objects) and local variables.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
| Constructor and Description |
|---|
InductionVarAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
void |
Display_store()
Displays (to System.out) all of the Swizzlers stored in the induction
variable store.
|
void |
displaySwizzler(Swizzler indswz)
Displays the contents of a Swizzler object to System.out.
|
MemExpr |
get_local(int vn)
Searchs the stored list of local variables for a local variable with a
given value number.
|
java.lang.Object |
get_swizzler(int vn)
Searches the list of induction variables for an induction variable with a
given value number.
|
void |
insert_aswrange(Swizzler indswz)
Adds a swizzle range statement (SRStmt) to the end of each predacessor
block of the block containing the phi statement that defines an induction
variable provided that the phi block does not dominate its predacessor.
|
Block |
isMu(PhiJoinStmt phi,
FlowGraph cfg)
Determines whether or not a phi statement is a mu function.
|
void |
transform(FlowGraph cfg)
Performs DIVA on a CFG.
|
public java.lang.Object get_swizzler(int vn)
vn - Value number to search for.public MemExpr get_local(int vn)
vn - The value number to search for.public void Display_store()
Swizzlerpublic void displaySwizzler(Swizzler indswz)
indswz - The Swizzler to display.public void insert_aswrange(Swizzler indswz)
indswz - Swizzler representing the induction variable on which the
range swizzle statement is added.public Block isMu(PhiJoinStmt phi, FlowGraph cfg)
phi - phi statement that may be a mu functioncfg - CFG to look through Get rid of this
parameterpublic void transform(FlowGraph cfg)