Interaction with Dynamic Schedulers
Dynamic schedulers are used in processors. They dynamically reorder the instructions and helps in maximizing the utilization of resources.
Goals of Dynamic Scheduler
- Improves efficiency of the processor
- Exploits instruction-level parallelism
When interacting with Dynamic Schedulers, the analysis of instruction dependency must be done correctly. Dynamic schedulers determines the order of execution of instructions correctly only when the data is accurate. Thus, the analysis of instruction dependency is important when interacting with dynamic schedulers. It involves analyzing data dependencies, control dependencies and resource dependencies. They work by assigning priorities to instructions so that they can be executed in a certain order. Dynamic schedulers makes decision based on the availability of resources. Dynamic Schedulers also helps in handling resource conflicts when there is a conflict among various resources. Code optimization also helps dynamic schedulers to improve instruction scheduling and resource utilization.
Global Code Scheduling in Compiler Design
In the fifth phase of compiler design, code optimization is performed. There are various code optimization techniques. But the order of execution of code in a computer program also matters in code optimization. Global Code Scheduling in compiler design is the process that is performed to rearrange the order of execution of code which improves performance. It comprises the analysis of different code segments and finding out the dependency among them.
The goals of Global Code Scheduling are:
- Optimize the execution order
- Improving the performance
- Reducing the idle time
- Maximize the utilization of resources
There are various techniques to perform Global Code Scheduling:
- Primitive Code Motion
- Upward Code Motion
- Downward Code Motion