reg[FIRST_DOUBLE + LAST_VOLATILE_FPR].linkWithNext(reg[FIRST_DOUBLE + FIRST_SCRATCH_FPR]); reg[FIRST_DOUBLE + LAST_VOLATILE_FPR].setVolatile(); if (FIRST_SCRATCH_FPR != LAST_SCRATCH_FPR) for (int i = FIRST_DOUBLE + FIRST_SCRATCH_FPR; i < FIRST_DOUBLE + LAST_SCRATCH_FPR; i++) { OPT_Register r = reg[i]; r.setVolatile(); r.linkWithNext(reg[i + 1]); } reg[FIRST_DOUBLE + LAST_SCRATCH_FPR].setVolatile();
  OPT_PhysicalRegisterSet() {        // 1. Create all the physical registers in the pool.    for (int i = 0; i < reg.length ; i++) {      OPT_Register r = new OPT_Register(i);      r.setPhysical();      reg[i] = r;    }        // 2. Set the 'integer' attribute on each GPR    for (int i = FIRST_INT; i < FIRST_DOUBLE; i++) {      reg[i].setInteger();    }        // 3. Set the 'double' attribute on each FPR    for (int i = FIRST_DOUBLE; i < FIRST_CONDITION; i++) {      reg[i].setDouble();    }    // 4. Set the 'condition' attribute on each CR    for (int i = FIRST_CONDITION; i < FIRST_SPECIAL; i++) {      reg[i].setCondition();    }    // 5. set up the volatile GPRs    for (int i = FIRST_VOLATILE_GPR; i < LAST_VOLATILE_GPR; i++) {      OPT_Register r= reg[i];      r.setVolatile();      r.linkWithNext(reg[i + 1]);    }    reg[LAST_VOLATILE_GPR].setVolatile();    reg[LAST_VOLATILE_GPR].linkWithNext(reg[FIRST_SCRATCH_GPR]);    for (int i = FIRST_SCRATCH_GPR; i < LAST_SCRATCH_GPR; i++) {      OPT_Register r = reg[i];      r.setVolatile();      r.linkWithNext(reg[i + 1]);    }    reg[LAST_SCRATCH_GPR].setVolatile();        // 6. set up the non-volatile GPRs    for (int i = FIRST_NONVOLATILE_GPR; i < LAST_NONVOLATILE_GPR; i++) {      OPT_Register r = reg[i];      r.setNonVolatile();      r.linkWithNext(reg[i + 1]);    }    // 7. set properties on some special registers    reg[PROCESSOR_REGISTER].setSpansBasicBlock();    reg[FRAME_POINTER].setSpansBasicBlock();    reg[JTOC_POINTER].setSpansBasicBlock();    reg[THREAD_ID_REGISTER].setSpansBasicBlock();    for (int i = FIRST_DOUBLE + FIRST_VOLATILE_FPR; i < FIRST_DOUBLE +         LAST_VOLATILE_FPR; i++) {      OPT_Register r = reg[i];      r.setVolatile();      r.linkWithNext(reg[i + 1]);    }    // 8. set up the volatile FPRs    reg[FIRST_DOUBLE + LAST_VOLATILE_FPR].linkWithNext(reg[FIRST_DOUBLE        + FIRST_SCRATCH_FPR]);    reg[FIRST_DOUBLE + LAST_VOLATILE_FPR].setVolatile();    if (FIRST_SCRATCH_FPR != LAST_SCRATCH_FPR)      for (int i = FIRST_DOUBLE + FIRST_SCRATCH_FPR; i < FIRST_DOUBLE +           LAST_SCRATCH_FPR; i++) {        OPT_Register r = reg[i];        r.setVolatile();        r.linkWithNext(reg[i + 1]);      }    reg[FIRST_DOUBLE + LAST_SCRATCH_FPR].setVolatile();    // 9. set up the non-volatile FPRs    for (int i = FIRST_DOUBLE + FIRST_NONVOLATILE_FPR; i < FIRST_DOUBLE        + LAST_NONVOLATILE_FPR; i++) {      OPT_Register r = reg[i];      r.setNonVolatile();      r.linkWithNext(reg[i + 1]);    }    // 10. set up the condition registers    int firstCR = -1;    int prevCR = -1;    for (int i = 0; i < NUM_CRS; i++) {      // TSR is non-allocatable      if (i == THREAD_SWITCH_REGISTER)        continue;      reg[FIRST_CONDITION + i].setVolatile();      if (prevCR != -1)        reg[FIRST_CONDITION + prevCR].linkWithNext(reg[FIRST_CONDITION                                                    + i]);      prevCR = i;      if (firstCR == -1)        firstCR = i;    }    // 11. cache the volatiles for efficiency    volatileSet = new OPT_BitSet(this);    for (Enumeration e = enumerateVolatiles(); e.hasMoreElements(); ) {      OPT_Register r = (OPT_Register)e.nextElement();      volatileSet.add(r);    }    // 12. Show which registers should be excluded from live analysis    reg[CTR].setExcludedLiveA();    reg[CR].setExcludedLiveA();    reg[TU].setExcludedLiveA();    reg[TL].setExcludedLiveA();    reg[XER].setExcludedLiveA();    reg[FRAME_POINTER].setExcludedLiveA();    reg[JTOC_POINTER].setExcludedLiveA();    reg[LR].setExcludedLiveA();  }