[PATCH] D22297: TableGen: Allow custom register operand decoder method

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 22:38:42 PDT 2016


arsenm created this revision.
arsenm added a subscriber: llvm-commits.

This is for a situation where the encoding for a register may be
different depending on the specific operand. For some instructions,
we want to apply additional restrictions beyond the encoding's
constraints.
   
In AMDGPU some operands are VSrc_32, using the VS_32 pseudo register
class which accept VGPRs, SGPRs, or immediates in the encoding.
Some specific instructions with the same encoding operand do not want
to allow immediates or SGPRs, but the encoding format is different
in this case than a regular VGPR_32 operand.
    
This allows specifying the encoding should be treated the same
without introducing yet another dummy register class.



http://reviews.llvm.org/D22297

Files:
  include/llvm/Target/Target.td
  utils/TableGen/FixedLenDecoderEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22297.63778.patch
Type: text/x-patch
Size: 4402 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160713/7a37286e/attachment.bin>


More information about the llvm-commits mailing list