[PATCH] D14994: Enable MatchRegisterName to match register altnames

Colin LeMahieu via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 13:09:51 PST 2015


colinl added a comment.

Hmm interesting.  That code section seems to be dead, for instance I did:

- dag regList, RegAltNameIndex idx = NoRegAltName>

+                    dag regList>

- RegAltNameIndex altNameIndex = idx

+  RegAltNameIndex altNameIndex = NoRegAltName;

And all the targets seem to still build which seems to indicate no target was using the defaulted template parameter.

I'm not sure why it would have been implemented that way.  When printing we need to make a one-to-many decision, one register enum maps to multiple register names and it seems like the natural name to pick would have been the primary one.  If they wanted to print a different register they would have swapped an alt name for the primary.

In the reverse direction it doesn't seem necessary to make that distinction, it's a many-to-one decision where multiple register names all map to a single register enum.


http://reviews.llvm.org/D14994





More information about the llvm-commits mailing list