protected boolean applyPeepholeBranchOpts(IR ir){
  boolean didSomething=false;
  for (Enumeration<BasicBlock> e=ir.getBasicBlocks(); e.hasMoreElements(); ) {
    BasicBlock bb=e.nextElement();
    if (!bb.isEmpty()) {
      for (Enumeration<Instruction> ie=bb.enumerateBranchInstructions(); ie.hasMoreElements(); ) {
        Instruction s=ie.nextElement();
        if (optimizeBranchInstruction(ir,s,bb)) {
          didSomething=true;
          ie=bb.enumerateBranchInstructions();
        }
      }
    }
  }
  return didSomething;
}

protected boolean applyPeepholeBranchOpts ( IR ir ) { boolean didSomething = false ; for ( Enumeration < BasicBlock > e = ir . getBasicBlocks ( ) ; e . hasMoreElements ( ) ; ) { BasicBlock bb = e . nextElement ( ) ; if ( ! bb . isEmpty ( ) ) { for ( Enumeration < Instruction > ie = bb . enumerateBranchInstructions ( ) ; ie . hasMoreElements ( ) ; ) { Instruction s = ie . nextElement ( ) ; if ( optimizeBranchInstruction ( ir , s , bb ) ) { didSomething = true ; ie = bb . enumerateBranchInstructions ( ) ; } } } } return didSomething ; }
this pass performs peephole branch optimizations . see muchnick ~ p . 590
