[LLVMdev] Virtual register??

Andrew Lenharth andrewl at lenharth.org
Thu Feb 8 13:22:08 PST 2007


On 2/8/07, Seung Jae Lee <lee225 at uiuc.edu> wrote:
> Would you mind telling me the difference between 'virtual register' and just 'register'?
> Thank you so much.

A virtual register is not one that exists on the hardware.  It is a
place holder used during instruction selection, but before register
allocation.  The target of the instruction selector is machine code
using mostly virtual registers (physical registers can exist at this
phase, but with some restrictions).  There are an unlimited number of
virtual registers to use.  The register allocator is responsible for
replacing the virtual registers with architectural registers.

Andrew



More information about the llvm-dev mailing list