| java.lang.Object EDU.purdue.cs.bloat.diva.InductionVarAnalyzer
InductionVarAnalyzer | public class InductionVarAnalyzer (Code) | | InductionVarAnalyzer traverses a control flow graph and looks for array
element swizzle operations inside loops. If possible, these swizzle
operations are hoisted out of the loop and are replaced with range swizzle
operations. The technique used is Demand-driven Induction Variable Analysis
(DIVA).
To accomplish its tasks, InductionVarAnalyzer keeps track of a number of
induction variables (represented by Swizzler objects) and local variables.
See Also: Swizzler See Also: LocalExpr |
Method Summary | |
public void | Display_store() Displays (to System.out) all of the Swizzlers stored in the induction
variable store. | public void | displaySwizzler(Swizzler indswz) Displays the contents of a Swizzler object to System.out. | public MemExpr | get_local(int vn) Searchs the stored list of local variables for a local variable with a
given value number.
Parameters: vn - The value number to search for. | public Object | get_swizzler(int vn) Searches the list of induction variables for an induction variable with a
given value number.
Parameters: vn - Value number to search for. | public 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. | public Block | isMu(PhiJoinStmt phi, FlowGraph cfg) Determines whether or not a phi statement is a mu function. | public void | transform(FlowGraph cfg) Performs DIVA on a CFG. |
DEBUG | public static boolean DEBUG(Code) | | |
Display_store | public void Display_store()(Code) | | Displays (to System.out) all of the Swizzlers stored in the induction
variable store.
See Also: Swizzler |
displaySwizzler | public void displaySwizzler(Swizzler indswz)(Code) | | Displays the contents of a Swizzler object to System.out.
Parameters: indswz - The Swizzler to display. |
get_local | public MemExpr get_local(int vn)(Code) | | Searchs the stored list of local variables for a local variable with a
given value number.
Parameters: vn - The value number to search for. The local variable with the given value number, or null, if notfound. |
get_swizzler | public Object get_swizzler(int vn)(Code) | | Searches the list of induction variables for an induction variable with a
given value number.
Parameters: vn - Value number to search for. Swizzler object whose target has the desired value number ornull, if value number is not found. |
insert_aswrange | public void insert_aswrange(Swizzler indswz)(Code) | | 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.
Phew.
Parameters: indswz - Swizzler representing the induction variable on which therange swizzle statement is added. |
isMu | public Block isMu(PhiJoinStmt phi, FlowGraph cfg)(Code) | | Determines whether or not a phi statement is a mu function. A mu function
is a phi function that merges values at loop headers, as opposed to those
that occur as a result of forward branching. Mu functions always have two
arguments.
Parameters: phi - phi statement that may be a mu function Parameters: cfg - CFG to look through Get rid of thisparameter The block containing the mu functions external (that is, outsidethe loop) argument, also known as the external ssalink. If thephi statement is not a mu function, null is returned. |
transform | public void transform(FlowGraph cfg)(Code) | | Performs DIVA on a CFG.
|
|
|