public static boolean useDoublesAsDef(Operand u,Instruction s){
  for (Enumeration<Operand> d=s.getDefs(); d.hasMoreElements(); ) {
    Operand def=d.nextElement();
    if (def != null) {
      if (def == u)       return true;
    }
  }
  return false;
}

public static boolean useDoublesAsDef ( Operand u , Instruction s ) { for ( Enumeration < Operand > d = s . getDefs ( ) ; d . hasMoreElements ( ) ; ) { Operand def = d . nextElement ( ) ; if ( def != null ) { if ( def == u ) return true ; } } return false ; }
is the operand u , which is a use in instruction s , also a def in instruction s ? that is , is this operand defined as a du operand in instructionformatlist . dat . < p > todo ! ! : this implementation is slow . think about adding some ir support for this functionality ; possibly add methods like enumeratepuredefs ( ) , enumerateimpureuses ( ) , etc . . . , and restructure the caller to avoid having to call this function . not going to put effort into this now , as the whole scratch register architecture has a questionable future .
