[PATCH] D120906: [ARM][AArch64] generate subtarget feature flags

Tomas Matheson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 06:55:45 PST 2022


tmatheson created this revision.
Herald added subscribers: mgrang, hiraditya, kristof.beyls, dschuff.
Herald added a project: All.
tmatheson requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch aims to reduce a lot of the boilerplate around adding new subtarget
features. From the SubtargetFeatures tablegen definitions, a series of calls to
the macro GET_SUBTARGETINFO_MACRO are generated in
ARM/AArch64GenSubtargetInfo.inc.  ARMSubtarget/AArch64Subtarget can then use
this macro to define bool members and the corresponding getter methods.

Some naming inconsistencies have been fixed to allow this, and one unused
member removed.

This implementation only applies to boolean members; in future both BitVector
and enum members could also be generated.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120906

Files:
  llvm/lib/Target/AArch64/AArch64.td
  llvm/lib/Target/AArch64/AArch64Subtarget.h
  llvm/lib/Target/ARM/ARM.td
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/lib/Target/ARM/ARMSubtarget.cpp
  llvm/lib/Target/ARM/ARMSubtarget.h
  llvm/utils/TableGen/SubtargetEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120906.412708.patch
Type: text/x-patch
Size: 69410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220303/fdf04100/attachment.bin>


More information about the llvm-commits mailing list