Class AbstractSSAConversion

  • Direct Known Subclasses:
    SSAConversion

    public abstract class AbstractSSAConversion
    extends Object
    Abstract core of traditional SSA conversion (Cytron et al.). This implementation is abstract in the sense that it is designed to work over the instructions and CFG of a Domo IR, but it is abstract with respect to several integral portions of the traditional algorithm:
    • The notion of uses and defs of a given instruction.
    • Assignments ( := ) that are be copy-propagated away
    • Which values are constants---i.e. have no definition.
    • Any value numbers to be skipped during SSA construction
    • Special initialization and exit block processing.
    • Constructor Detail

      • AbstractSSAConversion

        protected AbstractSSAConversion​(IR ir,
                                        SSAOptions options)
    • Method Detail

      • getNumberOfDefs

        protected abstract int getNumberOfDefs​(SSAInstruction inst)
      • getDef

        protected abstract int getDef​(SSAInstruction inst,
                                      int index)
      • getNumberOfUses

        protected abstract int getNumberOfUses​(SSAInstruction inst)
      • getUse

        protected abstract int getUse​(SSAInstruction inst,
                                      int index)
      • isAssignInstruction

        protected abstract boolean isAssignInstruction​(SSAInstruction inst)
      • getMaxValueNumber

        protected abstract int getMaxValueNumber()
      • skip

        protected abstract boolean skip​(int vn)
      • isConstant

        protected abstract boolean isConstant​(int valueNumber)
      • getNextNewValueNumber

        protected abstract int getNextNewValueNumber()
      • initializeVariables

        protected abstract void initializeVariables()
      • repairExit

        protected abstract void repairExit()
      • placeNewPhiAt

        protected abstract void placeNewPhiAt​(int value,
                                              SSACFG.BasicBlock Y)
      • repairPhiUse

        protected abstract void repairPhiUse​(SSACFG.BasicBlock BB,
                                             int phiIndex,
                                             int rvalIndex,
                                             int newRval)
      • repairInstructionUses

        protected abstract void repairInstructionUses​(SSAInstruction inst,
                                                      int index,
                                                      int[] newUses)
      • repairInstructionDefs

        protected abstract void repairInstructionDefs​(SSAInstruction inst,
                                                      int index,
                                                      int[] newDefs,
                                                      int[] newUses)
      • pushAssignment

        protected abstract void pushAssignment​(SSAInstruction inst,
                                               int index,
                                               int newRhs)
      • popAssignment

        protected abstract void popAssignment​(SSAInstruction inst,
                                              int index)
      • perform

        protected void perform()
      • init

        protected void init()
      • placePhiNodes

        protected void placePhiNodes()
      • skipRepair

        protected boolean skipRepair​(SSAInstruction inst,
                                     int index)
      • fail

        protected void fail​(int v)
      • hasDefaultValue

        protected boolean hasDefaultValue​(int valueNumber)
      • getDefaultValue

        protected int getDefaultValue​(int valueNumber)
      • top

        protected int top​(int v)