private static void splitAllLiveRanges(Instruction s,java.util.HashMap<Register,Register> newMap,IR ir,boolean rootOnly){
  for (Enumeration<Operand> u=rootOnly ? s.getRootUses() : s.getUses(); u.hasMoreElements(); ) {
    Operand use=u.nextElement();
    if (use.isRegister()) {
      RegisterOperand rUse=use.asRegister();
      RegisterOperand temp=findOrCreateTemp(rUse,newMap,ir);
      insertMoveBefore(temp,rUse.copyRO(),s);
    }
  }
  for (Enumeration<Operand> d=s.getDefs(); d.hasMoreElements(); ) {
    Operand def=d.nextElement();
    if (def.isRegister()) {
      RegisterOperand rDef=def.asRegister();
      RegisterOperand temp=findOrCreateTemp(rDef,newMap,ir);
      insertMoveAfter(rDef.copyRO(),temp,s);
    }
  }
  for (Enumeration<Operand> ops=rootOnly ? s.getRootOperands() : s.getOperands(); ops.hasMoreElements(); ) {
    Operand op=ops.nextElement();
    if (op.isRegister()) {
      RegisterOperand rOp=op.asRegister();
      Register r=rOp.getRegister();
      Register newR=newMap.get(r);
      if (newR != null) {
        rOp.setRegister(newR);
      }
    }
  }
}

private static void splitAllLiveRanges ( Instruction s , java . util . HashMap < Register , Register > newMap , IR ir , boolean rootOnly ) { for ( Enumeration < Operand > u = rootOnly ? s . getRootUses ( ) : s . getUses ( ) ; u . hasMoreElements ( ) ; ) { Operand use = u . nextElement ( ) ; if ( use . isRegister ( ) ) { RegisterOperand rUse = use . asRegister ( ) ; RegisterOperand temp = findOrCreateTemp ( rUse , newMap , ir ) ; insertMoveBefore ( temp , rUse . copyRO ( ) , s ) ; } } for ( Enumeration < Operand > d = s . getDefs ( ) ; d . hasMoreElements ( ) ; ) { Operand def = d . nextElement ( ) ; if ( def . isRegister ( ) ) { RegisterOperand rDef = def . asRegister ( ) ; RegisterOperand temp = findOrCreateTemp ( rDef , newMap , ir ) ; insertMoveAfter ( rDef . copyRO ( ) , temp , s ) ; } } for ( Enumeration < Operand > ops = rootOnly ? s . getRootOperands ( ) : s . getOperands ( ) ; ops . hasMoreElements ( ) ; ) { Operand op = ops . nextElement ( ) ; if ( op . isRegister ( ) ) { RegisterOperand rOp = op . asRegister ( ) ; Register r = rOp . getRegister ( ) ; Register newR = newMap . get ( r ) ; if ( newR != null ) { rOp . setRegister ( newR ) ; } } } }
split the live ranges of all register operands of an instruction
