[TableGen][RISCV][Hexagon][LoongArch] Add a list of Predicates to HwMode.
authorCraig Topper <craig.topper@sifive.com>
Tue, 14 Mar 2023 20:00:38 +0000 (13:00 -0700)
committerCraig Topper <craig.topper@sifive.com>
Tue, 14 Mar 2023 20:00:38 +0000 (13:00 -0700)
commit81a150656b7d856255d8073ec86fd304edd90aad
tree4dcd8eea5d7fb4026cd3395f215ee74bd542aa40
parentf47404b012d66ed0b411a2b3742931a14e85c80b
[TableGen][RISCV][Hexagon][LoongArch] Add a list of Predicates to HwMode.

Use the predicate condition instead of checkFeatures in *GenDAGISel.inc.

This makes the code similar to isel pattern predicates.

checkFeatures is still used by code created by SubtargetEmitter so
we can't remove the string. Backends need to be careful to keep
the string and predicates in sync, but I don't think that's a big issue.

I haven't measured it, but this should be a compile time improvement
for isel since we don't have to do any of the string processing that's
inside checkFeatures.

Reviewed By: kparzysz

Differential Revision: https://reviews.llvm.org/D146012
llvm/include/llvm/Target/Target.td
llvm/lib/Target/Hexagon/Hexagon.td
llvm/lib/Target/LoongArch/LoongArch.td
llvm/lib/Target/RISCV/RISCVFeatures.td
llvm/test/TableGen/HwModeEncodeDecode.td
llvm/test/TableGen/HwModeSelect.td
llvm/utils/TableGen/CodeGenDAGPatterns.cpp
llvm/utils/TableGen/CodeGenHwModes.cpp
llvm/utils/TableGen/CodeGenHwModes.h