Package EDU.purdue.cs.bloat.tree
Class Swizzler
- java.lang.Object
-
- EDU.purdue.cs.bloat.tree.Swizzler
-
public class Swizzler extends java.lang.ObjectSwizzler represents an induction variable that is used as an index into an array. Analysis can be done to determine if array swizzle (aswizzle) instruction(s) can be hoisted out of the loop.- See Also:
InductionVarAnalyzer
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Exprarray()SCStmtaswizzle()Exprend_val()Exprind_var()Exprinit_val()Blockphi_block()voidset_array(Expr a)voidset_aswizzle(SCStmt sc)voidset_end_val(Expr end)Sets the ending value for the induction variable.Exprtarget()
-
-
-
Constructor Detail
-
Swizzler
public Swizzler(Expr var, Expr tgt, Expr val, Block phiblock)
Constructor.- Parameters:
var- Induction variable. (An index variable for an array.)tgt- Target of the phi statement that defines the induction variable.val- Initial value of the induction variable.phiblock- The block in which the phi statement resides.
-
-
Method Detail
-
set_end_val
public void set_end_val(Expr end)
Sets the ending value for the induction variable.- Parameters:
end- The final value the induction variable will take on.
-
set_array
public void set_array(Expr a)
- Parameters:
a- The array that is indexed by the induction variable.
-
set_aswizzle
public void set_aswizzle(SCStmt sc)
- Parameters:
sc- The aswizzle statement that could be removed from the block.
-
ind_var
public Expr ind_var()
-
target
public Expr target()
-
init_val
public Expr init_val()
-
end_val
public Expr end_val()
-
array
public Expr array()
-
phi_block
public Block phi_block()
-
aswizzle
public SCStmt aswizzle()
-
-