Interface SSAPiNodePolicy

All Known Implementing Classes:
AllIntegerDueToBranchePiPolicy, CompoundPiPolicy, InstanceOfPiPolicy, NullTestPiPolicy

public interface SSAPiNodePolicy
The SSABuilder consults this as an oracle to decide how to insert SSAPiInstructions
  • Method Details

    • getPi

      Do we need to introduce a new name for some value immediately after a call?

      If so, returns a pair consisting of the value number needing renaming, and the instruction which should be recorded as the cause of the pi instruction

      Parameters:
      call - the call instruction in question
      symbolTable - current state of the symbol table for the IR under construction
      Returns:
      description of the necessary pi instruction, or null if no pi instruction is needed.
    • getPi

      Do we need to introduce a new name for some value after deciding on an outcome for a conditional branch instruction?

      If so, returns a pair consisting of the value number needing renaming, and the instruction which should be recorded as the cause of the pi instruction

      Parameters:
      cond - the conditional branch instruction in question
      def1 - the SSAInstruction that defs cond.getUse(0), or null if none
      def2 - the SSAInstruction that defs cond.getUse(1), or null if none
      symbolTable - current state of the symbol table for the IR under construction
      Returns:
      description of the necessary pi instruction, or null if no pi instruction is needed.
    • getPis