[PATCH] D67544: [TableGen] Support encoding and decoding per-HwMode

James Molloy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 03:59:27 PDT 2019


jmolloy created this revision.
jmolloy added reviewers: bkramer, ThomasRaoux, majnemer.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Much like ValueTypeByHwMode/RegInfoByHwMode, this patch allows targets
to modify an instruction's encoding based on HwMode. When the
EncodingInfos field is non-empty the Inst and Size fields of the Instruction
are ignored and taken from EncodingInfos instead.

As part of this promote getHwMode() from TargetSubtargetInfo to MCSubtargetInfo.

This is NFC for all existing targets - new code is generated only if targets
use EncodingByHwMode.


Repository:
  rL LLVM

https://reviews.llvm.org/D67544

Files:
  llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
  llvm/include/llvm/MC/MCSubtargetInfo.h
  llvm/include/llvm/Target/Target.td
  llvm/test/TableGen/HwModeEncodeDecode.td
  llvm/utils/TableGen/CodeEmitterGen.cpp
  llvm/utils/TableGen/CodeGenTarget.cpp
  llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
  llvm/utils/TableGen/InfoByHwMode.cpp
  llvm/utils/TableGen/InfoByHwMode.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67544.220072.patch
Type: text/x-patch
Size: 18795 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190913/6a07c843/attachment.bin>


More information about the llvm-commits mailing list