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

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 17:24:52 PDT 2022


skan added inline comments.


================
Comment at: llvm/utils/TableGen/SubtargetEmitter.cpp:1817
+                        !StringRef(Attribute).contains('[');
+    if (!IsBool)
+      continue;
----------------
tmatheson wrote:
> skan wrote:
> > Just checking `IsBool` could not handle some X86 features ...
> > ```
> > bool hasCMov() const { return HasCMov || X86SSELevel >= SSE1 || is64Bit(); }
> > bool useAA() const override { return UseAA; }
> > bool hasLAHFSAHF() const { return HasLAHFSAHF64 || !is64Bit(); }
> > ```
> IMO these functions should be renamed to make it clear they do more than just check a feature field.
> IMO these functions should be renamed to make it clear they do more than just check a feature field.

It loses the flexibility.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120906/new/

https://reviews.llvm.org/D120906



More information about the llvm-commits mailing list