The Phase Order of Instruction Scheduling
Instruction scheduling may be done either before or after register allocation or both before and after it. The advantage of doing it before register allocation is that this results in maximum parallelism. The disadvantage of doing it before register allocation is that this can result in the register allocator needing to use a number of registers exceeding those available. This will cause spill/fill code to be introduced which will reduce the performance of the section of code in question.
If the architecture being scheduled has instruction sequences that have potentially illegal combinations (due to a lack of instruction interlocks) the instructions must be scheduled after register allocation. This second scheduling pass will also improve the placement of the spill/fill code.
If scheduling is only done after register allocation then there will be false dependencies introduced by the register allocation that will limit the amount of instruction motion possible by the scheduler.
Read more about this topic: Instruction Scheduling
Famous quotes containing the words phase, order and/or instruction:
“I had let preadolescence creep up on me without paying much attentionand I seriously underestimated this insidious phase of child development. You hear about it, but youre not a true believer until it jumps out at you in the shape of your own, until recently quite companionable child.”
—Susan Ferraro (20th century)
“Pleasure cannot be shared; like Pain, it can only be experienced or inflicted, and when we give pleasure to our Lovers or bestow Charity upon the Needy, we do so, not to gratify the object of our Benevolence, but only ourselves. For the Truth is that we are kind for the same reason as we are cruel, in order that we may enhance the sense of our own Power.”
—Aldous Huxley (18941963)
“I have come to believe ... that the stage may do more than teach, that much of our current moral instruction will not endure the test of being cast into a lifelike mold, and when presented in dramatic form will reveal itself as platitudinous and effete. That which may have sounded like righteous teaching when it was remote and wordy will be challenged afresh when it is obliged to simulate life itself.”
—Jane Addams (18601935)