Class DefUse


  • public class DefUse
    extends Object
    An object which represent Def-Use information for an SSA IR
    • Field Detail

    • Method Detail

      • getMaxValueNumber

        protected int getMaxValueNumber()
        Returns:
        the maximum value number in a particular IR
      • initAllInstructions

        protected void initAllInstructions()
        Initialize the allInstructions field with every SSAInstruction in the ir.
      • getDef

        protected int getDef​(SSAInstruction s,
                             int i)
        What is the ith value number defined by instruction s?
      • getUse

        protected int getUse​(SSAInstruction s,
                             int i)
        What is the ith value number used by instruction s?
      • getNumberOfDefs

        protected int getNumberOfDefs​(SSAInstruction s)
        How many value numbers does instruction s def?
      • getNumberOfUses

        protected int getNumberOfUses​(SSAInstruction s)
        How many value numbers does instruction s use?
      • getUses

        public Iterator<SSAInstruction> getUses​(int v)
        Return all uses of the variable with the given value number
      • getNumberOfUses

        public int getNumberOfUses​(int v)
        Parameters:
        v - a value number
        Returns:
        the number of uses of the variable with the given value number