[llvm-commits] [llvm] r53207 - in /llvm/trunk: lib/Target/Target.td utils/TableGen/RegisterInfoEmitter.cpp

Evan Cheng evan.cheng at apple.com
Mon Jul 7 16:44:20 PDT 2008


This doesn't change that. There is a Name and a AsmName field. They  
can be different. e.g.
PPC::X9's Name field is now "X9" (the only difference being the  
previous name is lower cased "x9"), its AsmName is "r9".

Evan


On Jul 7, 2008, at 3:51 PM, Bill Wendling wrote:

> I put this in because PPC uses the same names for 64-bit and 32-bit
> registers. It's hard to determine which is which when it's printed
> out...
>
> -bw
>
> On Mon, Jul 7, 2008 at 3:19 PM, Evan Cheng <evan.cheng at apple.com>  
> wrote:
>> Author: evancheng
>> Date: Mon Jul  7 17:19:41 2008
>> New Revision: 53207
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=53207&view=rev
>> Log:
>> TargetRegisterDesc::Name field is the same as the abstract register  
>> name. There is no need for targets to specify register names in  
>> addition to their AsmName's.
>>
>> Modified:
>>   llvm/trunk/lib/Target/Target.td
>>   llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
>>
>> Modified: llvm/trunk/lib/Target/Target.td
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Target.td?rev=53207&r1=53206&r2=53207&view=diff
>>
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- llvm/trunk/lib/Target/Target.td (original)
>> +++ llvm/trunk/lib/Target/Target.td Mon Jul  7 17:19:41 2008
>> @@ -26,7 +26,6 @@
>> class Register<string n> {
>>  string Namespace = "";
>>  string AsmName = n;
>> -  string Name = n;
>>
>>  // SpillSize - If this value is set to a non-zero value, it is the  
>> size in
>>  // bits of the spill slot required to hold this register.  If this  
>> value is
>>
>> Modified: llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp?rev=53207&r1=53206&r2=53207&view=diff
>>
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp (original)
>> +++ llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp Mon Jul  7  
>> 17:19:41 2008
>> @@ -606,16 +606,7 @@
>>    else
>>      OS << Reg.getName();
>>    OS << "\",\t\"";
>> -    if (!Reg.TheDef->getValueAsString("Name").empty()) {
>> -      OS << Reg.TheDef->getValueAsString("Name");
>> -    } else {
>> -      // Default to "name".
>> -      if (!Reg.TheDef->getValueAsString("AsmName").empty())
>> -        OS << Reg.TheDef->getValueAsString("AsmName");
>> -      else
>> -        OS << Reg.getName();
>> -    }
>> -    OS << "\",\t";
>> +    OS << Reg.getName() << "\",\t";
>>    if (RegisterAliases.count(Reg.TheDef))
>>      OS << Reg.getName() << "_AliasSet,\t";
>>    else
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list