harpoon.Backend.Generic
Class RegFileInfo.SpillException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by harpoon.Backend.Generic.RegFileInfo.SpillException
All Implemented Interfaces:
Serializable
Enclosing class:
RegFileInfo

public abstract static class RegFileInfo.SpillException
extends Exception

SpillException tells a register allocator which Temps are appropriate for spilling in order to allocate space for another Temp. In the common case, this.getPotentialSpills() will just return an Iterator that iterates through singleton Sets for all of the registers. It is the responsibility of the register allocator to actually decide which set of registers to spill, to generate the code to save the values within said registers to their appropriate memory locations, and to generate the code to put those values back in the register file when they are needed next.

See Also:
Serialized Form

Constructor Summary
RegFileInfo.SpillException()
           
RegFileInfo.SpillException(String s)
           
 
Method Summary
abstract  Iterator getPotentialSpills()
          Returns an iterator of spill candidates.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegFileInfo.SpillException

public RegFileInfo.SpillException()

RegFileInfo.SpillException

public RegFileInfo.SpillException(String s)
Method Detail

getPotentialSpills

public abstract Iterator getPotentialSpills()
Returns an iterator of spill candidates.
effects: Returns a Set Iterator of spill candidates. Each element of the Iterator returned represents a Set of Register Temps that could be spilled to free up the amount of space needed for the attempted assignment in the register file. The returned Iterator is not guaranteed to iterate through all possible Sets of combinations of spill candidates, but should iterate through a decent selection so that the Register Allocator has significant freedom in selecting registers to spill.