[llvm-commits] [llvm] r47534 - in /llvm/trunk: include/llvm/Target/TargetRegisterInfo.h lib/CodeGen/MachineInstr.cpp lib/Target/PowerPC/PPCRegisterInfo.td lib/Target/Target.td utils/TableGen/RegisterInfoEmitter.cpp

Chris Lattner clattner at apple.com
Tue Feb 26 09:19:52 PST 2008

On Feb 26, 2008, at 1:18 AM, Bill Wendling wrote:

> On Feb 24, 2008, at 11:48 AM, Evan Cheng wrote:
>> I asked Bill to do this. Basically I want two names, one for
>> debugging, one for asmprinting.
>> I am ok with the patch except for the name "PrintableName". I'd  
>> prefer
>> just Name and AsmName, the later is only used for asm printing. To me
>> it's silly to change TargetRegisterInfo::getName() to a virtual
>> machine and use a switch statement. The increase size to
>> TargetRegisterDesc can't be that big an issue?
> I did it this way -- using PrintableName instead of AsmName --
> because I didn't want to make so many changes to the various back-
> ends. That's error prone because they all access .Name already (and
> most of them do it directly without going through the getName()
> method). I'm willing, of course, to go in and change PrintableName to
> AsmName and have that be what the various *AsmPrinters use to emit
> register names to the assembly files, but I just want to make sure
> that there isn't a better way of going about this instead. :-) What
> do you think?

Just do it as two patches: #1 renames Name -> AsmName.  Any places you  
miss will manifest as build errors, instead of subtle bugs.  After  
that is committed, #2 is rename PrintableName -> Name.


More information about the llvm-commits mailing list