protected static Operand follow(Operand use){
  if (!use.isRegister()) {
    return use;
  }
 else {
    RegisterOperand rop=use.asRegister();
    Enumeration<RegisterOperand> defs=DefUse.defs(rop.getRegister());
    if (!defs.hasMoreElements()) {
      return use;
    }
 else {
      Operand def=defs.nextElement();
      if (defs.hasMoreElements()) {
        return def;
      }
 else {
        Instruction instr=def.instruction;
        if (Move.conforms(instr)) {
          return follow(Move.getVal(instr));
        }
 else         if (MIR_Move.conforms(instr)) {
          return follow(MIR_Move.getValue(instr));
        }
 else {
          return def;
        }
      }
    }
  }
}

protected static Operand follow ( Operand use ) { if ( ! use . isRegister ( ) ) { return use ; } else { RegisterOperand rop = use . asRegister ( ) ; Enumeration < RegisterOperand > defs = DefUse . defs ( rop . getRegister ( ) ) ; if ( ! defs . hasMoreElements ( ) ) { return use ; } else { Operand def = defs . nextElement ( ) ; if ( defs . hasMoreElements ( ) ) { return def ; } else { Instruction instr = def . instruction ; if ( Move . conforms ( instr ) ) { return follow ( Move . getVal ( instr ) ) ; } else if ( MIR_Move . conforms ( instr ) ) { return follow ( MIR_Move . getValue ( instr ) ) ; } else { return def ; } } } } }
follow a chain of move operations filtering back to a def
