Abstract
Microprogram optimization is the rearrangement of microcode written vertically, with one operation issued per step, into legal horizontal microinstructions, in which several operations are issued each instruction cycle. The rearrangement is done in a way that approximately minimizes the running time of the code. This problem is identified with the problem of processor scheduling with resource constraints. Thus, the problem of optimizing basic blocks of microcode can be seen to be np-complete; however, approximate methods for basic blocks which have good records in other, similar scheduling environments can be used. In priority list scheduling the tasks are ordered according to some evaluation function, and then schedules are found by repeated scans of the list. Several evaluation functions are shown to perform very well on large samples of various classes of random data-precedence graphs with characteristics similar to those derived from microprograms. A method of spotting resource bottlenecks in the derived data-precedence graph enables one to obtain a resource-considerate evaluation function, in which tasks which contribute directly to or precede bottlenecks have their priorities raised. The complexity of the calculations necessary to compute the lower bound was greatly reduced. A method is suggested for optimizing beyond basic blocks. Groups of basicmore » blocks are treated as if they were one block; the information necessary to control the motion of tasks between blocks is encoded as data-precedence constraints on the conditional tasks. Long paths of code can thus be optimized, with no back branches, by the same methods used for basic blocks. 9 figures, 6 tables.« less