private static void removeInstrumentationFromOrig(IR ir,HashMap<BasicBlock,BasicBlock> origToDupMap){
  for (  BasicBlock origBlock : origToDupMap.keySet()) {
    for (Enumeration<Instruction> ie=origBlock.forwardInstrEnumerator(); ie.hasMoreElements(); ) {
      Instruction i=ie.nextElement();
      if (isInstrumentationInstruction(i) || (isYieldpoint(i) && ir.options.ADAPTIVE_REMOVE_YP_FROM_CHECKING)) {
        if (DEBUG)         VM.sysWrite("Removing " + i + "\n");
        i.remove();
      }
    }
  }
}

private static void removeInstrumentationFromOrig ( IR ir , HashMap < BasicBlock , BasicBlock > origToDupMap ) { for ( BasicBlock origBlock : origToDupMap . keySet ( ) ) { for ( Enumeration < Instruction > ie = origBlock . forwardInstrEnumerator ( ) ; ie . hasMoreElements ( ) ; ) { Instruction i = ie . nextElement ( ) ; if ( isInstrumentationInstruction ( i ) || ( isYieldpoint ( i ) && ir . options . ADAPTIVE_REMOVE_YP_FROM_CHECKING ) ) { if ( DEBUG ) VM . sysWrite ( "Removing " + i + "\n" ) ; i . remove ( ) ; } } } }
remove instrumentation from the original version of all duplicated basic blocks . < p > the yieldpoints can also be removed from either the original or the duplicated code . if you remove them from the original , it will make it run faster ( since it is executed more than the duplicated ) however that means that you can ' t turn off the instrumentation or you could infinitely loop without executing yieldpoints !
