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:
“The Indians feel that each stage is crucial and that the child should be allowed to dwell in each for the appropriate period of time so that every aspect of his being can evolve, just as a plant evolves in the proper time and sequence of the seasons. Otherwise, the child never has a chance to master himself in any one phase of his life.”
—Alan Quetone (20th century)
“Its not greed and ambition that makes warsits goodness. Wars are always fought for the best of reasons, for liberation or manifest destiny, always against tyranny and always in the best interests of humanity. So far this war, weve managed to butcher some 10,000,000 people in the interest of humanity. The next war, it seems well have to destroy all of man in order to preserve his damn dignity.”
—Paddy Chayefsky (19231981)
“Teaching is the perpetual end and office of all things. Teaching, instruction is the main design that shines through the sky and earth.”
—Ralph Waldo Emerson (18031882)