Class StackPRE


  • public class StackPRE
    extends java.lang.Object
    Eliminate partially redundant local variable loads and stores by replacing them with stack variables and dups. The algorithm is similar to SSAPRE, except: We need to place phis for locals at the IDF of the blocks containing defs and uses (not just defs).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected FlowGraph cfg  
      static boolean DEBUG  
      protected java.util.List[] stackvars  
      protected java.util.List[] varphis  
      protected EDU.purdue.cs.bloat.trans.StackPRE.Worklist worklist  
    • Constructor Summary

      Constructors 
      Constructor Description
      StackPRE​(FlowGraph cfg)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void transform()  
      java.util.List varPhisAtBlock​(Block block)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEBUG

        public static boolean DEBUG
      • varphis

        protected java.util.List[] varphis
      • stackvars

        protected java.util.List[] stackvars
      • worklist

        protected EDU.purdue.cs.bloat.trans.StackPRE.Worklist worklist
    • Constructor Detail

      • StackPRE

        public StackPRE​(FlowGraph cfg)
    • Method Detail

      • transform

        public void transform()
      • varPhisAtBlock

        public java.util.List varPhisAtBlock​(Block block)