Class Swizzler

java.lang.Object
EDU.purdue.cs.bloat.tree.Swizzler

public class Swizzler extends Object
Swizzler 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:
  • Constructor Details

    • 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 Details

    • 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()