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:
“This is certainly not the place for a discourse about what festivals are for. Discussions on this theme were plentiful during that phase of preparation and on the whole were fruitless. My experience is that discussion is fruitless. What sets forth and demonstrates is the sight of events in action, is living through these events and understanding them.”
—Doris Lessing (b. 1919)
“In order to cultivate yourself and to drop no lower than the level of the milieu in which you have landed, it is not enough to read Pickwick and memorize a monologue from Faust.... You need to work continually day and night, to read ceaselessly, to study, to exercise your will.... Each hour is precious.”
—Anton Pavlovich Chekhov (18601904)
“I turn my gaze
Back to the instruction manual which has made me dream of
Guadalajara.”
—John Ashbery (b. 1927)