question: private static void removeBranchesAfterGotos ( BasicBlock bb ) { Instruction firstGoto = null ; Instruction end = bb . lastRealInstruction ( ) ; for ( Enumeration < Instruction > branches = bb . enumerateBranchInstructions ( ) ; branches . hasMoreElements ( ) ; ) { Instruction s = branches . nextElement ( ) ; if ( Goto . conforms ( s ) ) { firstGoto = s ; break ; } } if ( firstGoto != null ) { Enumeration < Instruction > ie = IREnumeration . forwardIntraBlockIE ( firstGoto , end ) ; ie . nextElement ( ) ; while ( ie . hasMoreElements ( ) ) { Instruction s = ie . nextElement ( ) ; if ( GuardResultCarrier . conforms ( s ) ) { insertTrueGuard ( s , GuardResultCarrier . getGuardResult ( s ) ) ; } s . remove ( ) ; } } }
target:  To maintain IR integrity, remove any branches that are after the first GOTO in the basic block.