[llvm-commits] [llvm] r43918 - in /llvm/trunk/lib/Target/X86: X86RegisterInfo.cpp X86RegisterInfo.td

Chris Lattner clattner at apple.com
Fri Nov 9 09:03:01 PST 2007


On Nov 9, 2007, at 8:55 AM, Evan Cheng wrote:

> Since I gave bad advice last time, how about one more advice? :-)
>
> Create a DenseMap mapping from target registers to dwarf numbers at
> X86RegisterInfo ctor (or on demand the first time getDwarfRegNum is
> called). So subsequent queries should be nice and fast.

Ick :)

> Frankly I don't think the issue is worth spending this much time on.
> Whatever works and maintainable is good.

I'd prefer to use one switch statement form or the other.  The  
compiler should be able to turn trivial switches like that into an  
array lookup.  Note that it doesn't currently, but adding this  
shouldn't be hard.

-Chris



More information about the llvm-commits mailing list