OPT_GenericStackManager sm = ir.stackManager;
      public void perform(OPT_IR ir) {        this.ir = ir;        //  The registerManager has already been initialized        OPT_GenericStackManager sm = ir.stackManager;        // Get register restrictions        // OPT_RegisterRestrictions restrict = sm.getRestrictions(); - unused        // Create the object that manages spill locations        spillManager = new SpillLocationManager(ir);        // Create an (empty) set of active intervals.        ActiveSet active = new ActiveSet(ir,spillManager);        ir.MIRInfo.linearScanState.active = active;        // Intervals sorted by increasing start point        ArrayList intervals = ir.MIRInfo.linearScanState.intervals;        for (Iterator e = intervals.iterator(); e.hasNext(); ) {          MappedBasicInterval bi = (MappedBasicInterval)e.next();          CompoundInterval ci = bi.container;          active.expireOldIntervals(bi);          // If the interval does not correspond to a physical register          // then we process it.          if (!ci.getRegister().isPhysical()) {            // Update register allocation based on the new interval.            active.allocate(bi,ci);          } else {            // Mark the physical register as currently allocated.            ci.getRegister().allocateRegister();          }          active.add(bi);        }        // update the state.        if (active.spilledSomething()) {          ir.MIRInfo.linearScanState.spilledSomething = true;        }      }