Ejemplo n.º 1
0
  /**
   * End an interval of scratch-ness for a symbolic register.
   *
   * @param r the symbolic register being moved into scratch
   * @param end the instruction before which the scratch interval ends
   */
  public void endSymbolicInterval(Register r, Instruction end) {
    if (DEBUG) {
      System.out.println("endSymbolicInterval " + r + " " + end.scratch);
    }

    SymbolicInterval i = (SymbolicInterval) pending.get(r);
    i.end = end;
    pending.remove(i);
  }
Ejemplo n.º 2
0
  /**
   * Begin a new interval of scratch-ness for a symbolic register.
   *
   * @param r the symbolic register being moved into scratch
   * @param scratch the physical register being used as a scratch
   * @param begin the instruction before which the physical register is vacated.
   */
  void beginSymbolicInterval(Register r, Register scratch, Instruction begin) {
    if (DEBUG) {
      System.out.println("beginSymbolicInterval " + r + " " + scratch + " " + begin.scratch);
    }

    SymbolicInterval i = new SymbolicInterval(r, scratch);
    i.begin = begin;
    ArrayList<Interval> v = findOrCreateIntervalSet(r);
    v.add(i);
    pending.put(r, i);
  }