[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

Bill Wendling isanbard at gmail.com
Tue Feb 26 01:18:52 PST 2008

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?


More information about the llvm-commits mailing list