×

Method and apparatus for optimizing cost-based heuristic instruction scheduling

  • US 5,367,687 A
  • Filed: 07/07/1993
  • Issued: 11/22/1994
  • Est. Priority Date: 03/11/1991
  • Status: Expired due to Term
First Claim
Patent Images

1. In a computer system comprising a pipelined processor for executing instructions of programs in a parallel and overlapping manner, and a compiler for compiling and generating said instructions, wherein said compiler has a scheduler for scheduling said instructions for execution on said pipelined processor, and said scheduler schedules said instructions using N weighted cost based heuristics, a method for empirically selecting a set of N weights for said scheduler to weigh said N cost based heuristics, said method comprising the steps of:

  • a) generating arbitrarily an initial trial set of N weights, initializing said scheduler with said arbitrarily generated initial trial set of N weights, generating a plurality of benchmark programs, compiling said benchmark programs using said compiler, accumulating scheduling costs determined by said scheduler for said benchmark programs, initializing a lowest accumulated scheduling cost of said benchmark programs to said accumulated scheduling cost, and selecting said initial trial set of N weights as the selected set of N weights for said scheduler;

    b) generating sequentially a first plurality of additional trial sets of N weights in a first manner, one trial set of N weights at a time, each of said first plurality of additional trial sets of N weights being generated by systematically varying the immediately preceding trial set of N weights along an orthogonal dimension of a weight space formed by the N weights, one orthogonal dimension at a time, reinitializing said scheduler with each of said additional trial sets of N weights after each of their generations, regenerating said plurality of benchmark programs after each of said reinitializations, recompiling said regenerated benchmark programs using said compiler after each of said regenerations, reaccumulating scheduling costs determined by said scheduler for said benchmark programs during each of said recompilations, comparing each of said reaccumulated scheduling cost with said lowest accumulated scheduling cost to determine whether a new lowest accumulated scheduling cost is found after each of said reaccumulations, terminating said generation of additional trial sets of N weights in said first manner as soon as a new lowest accumulated scheduling cost is found, updating said lowest accumulated scheduling cost to equal the newly found lowest accumulated scheduling cost if a new lowest accumulated scheduling cost is found, and selecting the trial set of N weights that yields the new lowest accumulated scheduling cost over the previously selected set of N weights as the selected set of N weights for said scheduler if a new lowest accumulated scheduling cost is found; and

    c) generating sequentially a second plurality of additional trial sets of N weights in a second manner, one additional trial set of N weights at a time, each of said additional trial sets of N weights being generated under said second manner by systematically varying the immediately preceding trial set of N weights along the last orthogonal dimension with the last systematic variation made under said first manner, reinitializing said scheduler with each of said additional trial sets of N weights after each of their generations, regenerating said plurality of benchmark programs after each of said reinitializations, recompiling said regenerated benchmark programs using said compiler after each of said regenerations, reaccumulating scheduling costs determined by said scheduler for said benchmark programs during each of said recompilations, comparing each of said reaccumulated scheduling cost with said lowest accumulated scheduling cost to determine whether a new lowest accumulated scheduling cost is found after each of said reaccumulations, terminating said generation of additional trial sets in said second manner as soon as no new lowest accumulated scheduling cost is found, updating said lowest accumulated scheduling cost to equal the last newly determined lowest accumulated scheduling cost if at least one newly determined lowest accumulated scheduling cost is found, and selecting the last trial set of N weights that yields the last new lowest accumulated scheduling cost over the previously selected set of N weights as the selected set of N weights for said scheduler if at least one newly determined lowest accumulated scheduling cost is found.

View all claims
  • 0 Assignments
Timeline View
Assignment View
    ×
    ×