Class StackScheduler


  • public class StackScheduler
    extends Object
    A linearizer that walks the IR blocks in order and produces a flat schedule of loads, stores and executions, tracking the peak operand stack depth as it goes.
    • Constructor Detail

      • StackScheduler

        public StackScheduler​(IRMethod method,
                              RegisterAllocator regAlloc)
        Creates a scheduler over one method and its register allocation.
        Parameters:
        method - the method to schedule
        regAlloc - allocation supplying the slot for each value that needs a load or store
    • Method Detail

      • getMethod

        public IRMethod getMethod()
        Returns:
        the method
      • getMaxStack

        public int getMaxStack()
        Returns:
        the max stack
      • schedule

        public void schedule()
        Schedules every block in order, appending to the existing schedule and updating the peak stack depth.