[LLVMdev] Register Alias Sets

David Greene greened at obbligato.org
Fri Apr 6 14:51:53 PDT 2007


I notice that in X86GenRegisterInfo.inc, the AliasSets do not
include the register being queried.  For example:

   const unsigned RAX_AliasSet[] = { X86::EAX, X86::AX, X86::AL, X86::AH,
0 };
   const unsigned EAX_AliasSet[] = { X86::RAX, X86::AX, X86::AL, 
X86::AH, 0 };

This makes it hard to do set comparisons.  RAX and EAX really have
equivalent alias sets but one wouldn't know that from these definitions.

Is there a specific reason that these registers are left out?  Would
things seriously break if they were added in?

I know RegAllocLinearScan.cpp does some checks for register aliasing
by looking for empty AliasSets.  I imagine that'll get us into trouble.

                                 -Dave



More information about the llvm-dev mailing list