for (Enumeration e = phys.enumerateNonvolatileGPRs();
for (Enumeration e = phys.enumerateNonvolatileGPRsBackwards();
  private OPT_Register getFirstGPRNotUsedIn(OPT_Register r,                                             OPT_Instruction s,                                             ArrayList reserved) {    OPT_PhysicalRegisterSet phys = ir.regpool.getPhysicalRegisterSet();    // first try the volatiles    for (Enumeration e = phys.enumerateVolatileGPRs();         e.hasMoreElements(); ) {      OPT_Register p= (OPT_Register)e.nextElement();      if (!appearsIn(p,s) && !p.isPinned() && !reserved.contains(p)          && isLegal(r,p,s)) {        return p;      }    }    // next try the non-volatiles    for (Enumeration e = phys.enumerateNonvolatileGPRs();          e.hasMoreElements(); ) {      OPT_Register p = (OPT_Register)e.nextElement();      if (!appearsIn(p,s) && !p.isPinned() && !reserved.contains(p) &&           isLegal(r,p,s)) {        return p;      }    }    OPT_OptimizingCompilerException.TODO(                                         "Could not find a free GPR in spill situation");    return null;  }