Overview
While an out-of-order CPU executes instructions as soon as they are ready, it must 'finish' them in the order the programmer intended. The ROB acts as a buffer that holds the results of executed instructions until it is their turn to be committed to the final state of the machine.
Functions
- In-Order Retirement: Ensures that if an exception or branch misprediction occurs, the state of the machine is consistent.
- Speculative Storage: Holds results from speculatively executed instructions until they are confirmed to be on the correct path.
- Register Renaming Support: Helps track which physical registers correspond to which architectural registers at any given point in the program.
Size
The size of the ROB is a major factor in how far 'ahead' a CPU can look to find parallelism.