/** * End an interval of scratch-ness for a physical register. * * @param r the physical register being used as a scratch * @param end the instruction before which the physical register is vacated. */ public void endScratchInterval(Register r, Instruction end) { if (DEBUG) { System.out.println("endScratchInterval " + r + " " + end.scratch); } PhysicalInterval p = (PhysicalInterval) pending.get(r); p.end = end; pending.remove(r); }
/** * Begin a new interval of scratch-ness for a physical register. * * @param r the physical register being used as a scratch * @param begin the instruction before which the physical register is vacated. */ void beginScratchInterval(Register r, Instruction begin) { if (DEBUG) { System.out.println("beginScratchInterval " + r + " " + begin.scratch); } PhysicalInterval p = new PhysicalInterval(r); p.begin = begin; ArrayList<Interval> v = findOrCreateIntervalSet(r); v.add(p); pending.put(r, p); }