[llvm] [TableGen] Add an option to SubtargetFeature to disable setting the field to the maximum value (PR #116594)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 09:21:46 PST 2024
================
@@ -1902,8 +1902,9 @@ void SubtargetEmitter::parseFeaturesFunction(raw_ostream &OS) {
StringRef Instance = R->getName();
StringRef Value = R->getValueAsString("Value");
StringRef FieldName = R->getValueAsString("FieldName");
+ bool SetMaxValue = R->getValueAsBit("SetMaxValue");
- if (Value == "true" || Value == "false")
+ if (Value == "true" || Value == "false" || !SetMaxValue)
OS << " if (Bits[" << Target << "::" << Instance << "]) " << FieldName
----------------
topperc wrote:
The generated code here processes each feature in alphabetical order. Its not connected to the order on the command line or the order declare in tablegen. So this doesn't do "last specified value".
https://github.com/llvm/llvm-project/pull/116594
More information about the llvm-commits
mailing list