[PATCH] D121768: [tablgen][X86] Auto-generate fields & interfaces for target features
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 15 23:47:16 PDT 2022
skan added inline comments.
================
Comment at: llvm/lib/Target/X86/X86.td:22
-def Mode64Bit : SubtargetFeature<"64bit-mode", "In64BitMode", "true",
"64-bit mode (x86_64)">;
----------------
pengfei wrote:
> I think `In64BitMode` is more readable, we usually generate 32 bit instructions under 64 bit mode.
It's meaningless to have different name for inteface and the member. We already use the interface `is64Bit`.
================
Comment at: llvm/lib/Target/X86/X86.td:33
def FeatureX87 : SubtargetFeature<"x87","HasX87", "true",
"Enable X87 float instructions">;
----------------
pengfei wrote:
> How about define a new class like `TrivalSubtargetFeature` so that we don't need to add `, [], 0` to the old one?
If so, then we have to replace most of `SubtargetFeature` with `TrivalSubtargetFeature`. Now we only need to add `, [], 0` for CMOV, so I think `TrivalSubtargetFeature` is
not worthy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121768/new/
https://reviews.llvm.org/D121768
More information about the llvm-commits
mailing list