Instruction scheduling: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
m Add: doi. Removed URL that duplicated unique identifier. | You can use this bot yourself. Report bugs here. | Activated by User:AManWithNoPlan | via #UCB_toolbar
alpha, simplify headings
Line 31:
* If choosing a candidate will create many new sources, its priority will rise. This heuristic tends to generate more freedom for the scheduler.
 
== The phasePhase 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.
 
Line 38:
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.
 
== Types of instruction scheduling ==
There are several types of instruction scheduling:
#''Local'' (''basic block'') ''scheduling'': instructions can't move across basic block boundaries.
#''Global scheduling'': instructions can move across basic block boundaries.
#''Modulo scheduling'': an algorithm for generating [[software pipelining]], which is a way of increasing instruction level parallelism by interleaving different iterations of an inner [[Control_flowControl flow#Loops|loop]].
#''[[Trace scheduling]]'': the first practical approach for global scheduling, trace scheduling tries to optimize the control flow path that is executed most often.
#''Superblock scheduling'': a simplified form of trace scheduling which does not attempt to merge control flow paths at trace "side entrances". Instead, code can be implemented by more than one schedule, vastly simplifying the code generator.
 
==See also ==
* [[Branch predication]]
* [[Code generation (compiler)|Code generation]]
* [[Instruction unit]]
* [[Branch predication]]
 
==References==