Class PiNodeManager


  • public class PiNodeManager
    extends Object
    This class does the real high-level work. It takes a Jimple body or Jimple/Shimple hybrid body and produces pure Shimple.

    The work is done in two main steps:

    1. Trivial Phi nodes are added.
    2. A renaming algorithm is executed.

    This class can also translate out of Shimple by producing an equivalent Jimple body with all Phi nodes removed.

    Note that this is an internal class, understanding it should not be necessary from a user point-of-view and relying on it directly is not recommended.

    Author:
    Navindra Umanee
    See Also:
    ShimpleBody, Efficiently Computing Static Single Assignment Form and the Control Dependence Graph
    • Constructor Detail

      • PiNodeManager

        public PiNodeManager​(ShimpleBody body,
                             boolean trimmed,
                             ShimpleFactory sf)
        Transforms the provided body to pure SSA form.
    • Method Detail

      • update

        public void update()
      • insertTrivialPiNodes

        public boolean insertTrivialPiNodes()
      • insertPiNodes

        public void insertPiNodes​(Local local,
                                  Block frontierBlock)
      • piHandleIfStmt

        public void piHandleIfStmt​(Local local,
                                   IfStmt u)
      • piHandleSwitchStmt

        public void piHandleSwitchStmt​(Local local,
                                       Unit u)
      • eliminatePiNodes

        public void eliminatePiNodes​(boolean smart)
      • getUseBoxesFromBlock

        public static List<ValueBox> getUseBoxesFromBlock​(Block block)