[LLVMdev] TargetRegisterClass for Physical Register

Chris Lattner sabre at nondot.org
Tue Jun 19 09:20:04 PDT 2007


On Tue, 19 Jun 2007, David A. Greene wrote:
> The model is correct, I believe.  My "yuck" comment was about the necessity
> of iterating through all members of all register classes to find the classes a
> physical register is in.  It would be nice to have a backmap.  Perhaps I'll
> fiddle around with TableGen and friends and see about adding one if folks
> think it's useful.

Ah, ok.  Unless there are a lot of clients, I don't think this is 
something tblgen should generate.  It's a one to many mapping, and any 
particular client can do a linear scan over the registers to invert the 
mapping if they need efficient access to the reverse map.  Does that make 
sense?

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list