Program: 150124
Project: 150124
Buggy source:
/** 
 * Calculate SSA form for an IR.  This routine holds the guts of the transformation.
 * @param ir the governing IR
 * @param scalarsOnly: should we compute SSA only for scalar variables?
 * @param backwards: If this is true, then every statement thatcan leave the procedure is considered to <em> use </em> every heap  variable.  This option is useful for backwards analyses such as dead store elimination.
 * @param heapTypes: If this variable is non-null, then heap array SSAform will restrict itself to this set of types. If this is null, build  heap array SSA for all types.
 * @param insertUsePhis: Should we insert uphi functions for heap arraySSA? ie., should we create a new name for each heap array at every use  of the heap array? This option is useful for some analyses, such as our redundant load elimination algorithm.
 * @param insertPEIDeps: Should we model exceptions with an explicitheap variable for exception state? This option is useful for global code placement algorithms.
 * @param excludeGuards: Should we exclude guard registers from SSA?
 */
private void computeSSA(OPT_IR ir,boolean scalarsOnly,boolean backwards,Set heapTypes,boolean insertUsePhis,boolean insertPEIDeps,boolean excludeGuards){
  if (ir.options.READS_KILL)   insertUsePhis=true;
  if (!scalarsOnly)   ir.HIRInfo.SSADictionary=new OPT_SSADictionary(heapTypes,insertUsePhis,insertPEIDeps,ir);
 else   ir.HIRInfo.SSADictionary=new OPT_SSADictionary(null,insertUsePhis,insertPEIDeps,ir);
  if (DEBUG)   System.out.println("String_Node_Str");
  OPT_DefUse.computeDU(ir);
  OPT_DefUse.recomputeSSA(ir);
  OPT_Register[] symbolicRegisters=getSymbolicRegisters();
  if (DEBUG)   System.out.println("String_Node_Str");
  OPT_BitVector[] defSets=getDefSets();
  if (DEBUG)   System.out.println("String_Node_Str");
  insertPhiFunctions(ir,defSets,symbolicRegisters,excludeGuards);
  if (!scalarsOnly) {
    insertHeapVariables(ir,backwards);
  }
  if (DEBUG)   System.out.println("String_Node_Str");
  if (DEBUG)   OPT_SSA.printInstructions(ir);
  if (DEBUG)   System.out.println("String_Node_Str");
  renameSymbolicRegisters(symbolicRegisters);
  if (!scalarsOnly) {
    renameHeapVariables(ir);
  }
  if (DEBUG)   System.out.println("String_Node_Str");
  if (ir.options.PRINT_SSA)   OPT_SSA.printInstructions(ir);
}

Fixed version (ground truth):
/** 
 * Calculate SSA form for an IR.  This routine holds the guts of the transformation.
 * @param ir the governing IR
 * @param scalarsOnly should we compute SSA only for scalar variables?
 * @param backwards If this is true, then every statement thatcan leave the procedure is considered to <em> use </em> every heap  variable.  This option is useful for backwards analyses such as dead store elimination.
 * @param heapTypes If this variable is non-null, then heap array SSAform will restrict itself to this set of types. If this is null, build  heap array SSA for all types.
 * @param insertUsePhis Should we insert uphi functions for heap arraySSA? ie., should we create a new name for each heap array at every use  of the heap array? This option is useful for some analyses, such as our redundant load elimination algorithm.
 * @param insertPEIDeps Should we model exceptions with an explicitheap variable for exception state? This option is useful for global code placement algorithms.
 * @param excludeGuards Should we exclude guard registers from SSA?
 */
private void computeSSA(OPT_IR ir,boolean scalarsOnly,boolean backwards,Set heapTypes,boolean insertUsePhis,boolean insertPEIDeps,boolean excludeGuards){
  if (ir.options.READS_KILL)   insertUsePhis=true;
  if (!scalarsOnly)   ir.HIRInfo.SSADictionary=new OPT_SSADictionary(heapTypes,insertUsePhis,insertPEIDeps,ir);
 else   ir.HIRInfo.SSADictionary=new OPT_SSADictionary(null,insertUsePhis,insertPEIDeps,ir);
  if (DEBUG)   System.out.println("String_Node_Str");
  OPT_DefUse.computeDU(ir);
  OPT_DefUse.recomputeSSA(ir);
  OPT_Register[] symbolicRegisters=getSymbolicRegisters();
  if (DEBUG)   System.out.println("String_Node_Str");
  OPT_BitVector[] defSets=getDefSets();
  if (DEBUG)   System.out.println("String_Node_Str");
  insertPhiFunctions(ir,defSets,symbolicRegisters,excludeGuards);
  if (!scalarsOnly) {
    insertHeapVariables(ir,backwards);
  }
  if (DEBUG)   System.out.println("String_Node_Str");
  if (DEBUG)   OPT_SSA.printInstructions(ir);
  if (DEBUG)   System.out.println("String_Node_Str");
  renameSymbolicRegisters(symbolicRegisters);
  if (!scalarsOnly) {
    renameHeapVariables(ir);
  }
  if (DEBUG)   System.out.println("String_Node_Str");
  if (ir.options.PRINT_SSA)   OPT_SSA.printInstructions(ir);
}