Register renaming

From Computer History Wiki
Revision as of 04:12, 13 December 2018 by Jnc (talk | contribs) (+cat)
Jump to: navigation, search

Register renaming is a technique used in the implementation of superscalar processors, particularly in those using out-of-order execution, to avoid 'stalls' caused by conflicts over register usage.

When an instruction wants to store its result in a register, the old contents of which some prior instruction (in program terms, not execution time terms) needs to use as an input, the first instruction cannot complete until the second has started. If the first instruction instead places its output in another, 'hidden' internal register, the conflict can be avoided. Later references to the output of the first instruction will of course have to use the value in the hidden internal register - this is the renaming.

One cause of this is the fact that due to the fixed word size used for an instruction set, not many bits are available to name registers, but modern processors can have a lot of registers, more than can be named in the instructions - use of these keeps the data in the CPU, where it is quickly accessible. Register renaming is however needed to make use of them.