question: @ Override public final void perform ( IR ir ) { java . util . HashMap < Register , Register > newMap = new java . util . HashMap < Register , Register > ( 5 ) ; for ( Enumeration < BasicBlock > be = ir . getBasicBlocks ( ) ; be . hasMoreElements ( ) ; ) { BasicBlock bb = be . nextElement ( ) ; for ( Enumeration < Instruction > ie = bb . forwardInstrEnumerator ( ) ; ie . hasMoreElements ( ) ; ) { Instruction s = ie . nextElement ( ) ; ; newMap . clear ( ) ; if ( s . isPEI ( ) && s . operator ( ) != IR_PROLOGUE ) { if ( bb . hasApplicableExceptionalOut ( s ) || ! RegisterRestrictions . SCRATCH_IN_PEI ) { splitAllLiveRanges ( s , newMap , ir , false ) ; } } switch ( s . getOpcode ( ) ) { case MIR_LOWTABLESWITCH_opcode : { RegisterOperand rOp = MIR_LowTableSwitch . getIndex ( s ) ; RegisterOperand temp = findOrCreateTemp ( rOp , newMap , ir ) ; insertMoveBefore ( temp , rOp . copyRO ( ) , s ) ; rOp . setRegister ( temp . getRegister ( ) ) ; } break ; } } } }
target:  The main method.<p> We split live ranges for registers around PEIs which have catch blocks.  Suppose we have a PEI s which uses a symbolic register r1.  We must ensure that after register allocation, r1 is NOT assigned to a scratch location in s, since this would mess up code in the catch block that uses r1.<p> So, instead, we introduce a new temporary r2 which holds the value of r1.  The live range for r2 spans only the instruction s.  Later, we will ensure that r2 is never spilled.<p> TODO: This could be implemented more efficiently.