Difference between revisions of "Register renaming"

From Computer History Wiki
Jump to: navigation, search
(A pretty good start)
 
m (typos)
Line 1: Line 1:
'''Register renaming''' is a technique used in the implementation of [[superscalar]] [[Central Processing Unit|processors]], particularly in those using [[out-of-order execution]], to avoid 'stalls' caused by conflicts over register usage.
+
'''Register renaming''' is a technique used in the implementation of [[superscalar]] [[Central Processing Unit|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 (in [[program]] terms, not [[execute|execution]] 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.
+
When an [[instruction]] wants to store its result in a register, the old contents of which some prior instruction (in [[program]] terms, not [[execute|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.
 
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.
  
 
{{semi-stub}}
 
{{semi-stub}}
\
 

Revision as of 20:37, 5 December 2018

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.