[LLVMdev] FYI: Removal of XXXRegisterClass from GenRegisterInfo.inc

Craig Topper craig.topper at gmail.com
Sun Apr 22 11:39:26 PDT 2012


In r155270, I removed code from TableGen that emitted XXXRegisterClass into
GenRegisterInfo.inc. This value was just a const pointer to XXXRegClass. So
all places that used XXXRegisterClass should be changed to
&XXXRegisterClass. I already did the conversion for all targets in the tree
so this is a notice to out of tree targets.

One of the most common place you might find this is setting up register
classes in TargetLowering. For example,

  addRegisterClass(MVT::i8, X86::GR8RegisterClass);
  addRegisterClass(MVT::i16, X86::GR16RegisterClass);
  addRegisterClass(MVT::i32, X86::GR32RegisterClass);

These should be changed to

  addRegisterClass(MVT::i8, &X86::GR8RegClass);
  addRegisterClass(MVT::i16, &X86::GR16RegClass);
  addRegisterClass(MVT::i32, &X86::GR32RegClass);

Hopefully, this change won't cause too much trouble.

-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120422/0fd3ed9c/attachment.html>


More information about the llvm-dev mailing list