[LLVMdev] request for help writing a register allocator

Chris Lattner clattner at apple.com
Tue Oct 20 12:49:55 PDT 2009


<ccing llvmdev>

On Oct 20, 2009, at 12:46 PM, Susan Horwitz wrote:

> On Tue, 20 Oct 2009, Chris Lattner wrote:
>
>> Each virtual register has an assigned register class.  However,  
>> register classes relate to each other, and the machine IR also has  
>> subreg references. For example, this is how X86 handles AL/AX/EAX/ 
>> RAX all aliasing each other. In the Sparc backend, the only aliases  
>> are in the FPU, and it doesn't use subregs to model them at this  
>> point.
>
> So if AL is a sub-register of EAX (assume this is true even if not),  
> then will getAliasSet(AL) include EAX, and will getAliasSet(EAX)  
> include AL? If yes, then I think I'm OK.

Yes, I believe so.

-Chris



More information about the llvm-dev mailing list