-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[TableGen] Restore OpName::OPERAND_LAST emission in InstrInfoEmitter #125265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jurahul
commented
Jan 31, 2025
- Looks like this sentinel value is used in some downstream backends, so restore emitting it.
- It now also has the correct value (earlier code may have emitted an incorrect value for OPERAND_LAST and hence it was removed in [TableGen] Improvements to Named operands in InstrInfoEmitter #124960)
- Looks like this sentinel value is used in some downstream backends, so restore emitting it. - It now also has the correct value (earlier code may hve emitted an incorrect value for OPERAND_LAST and hence it was removed in llvm#124960)
@llvm/pr-subscribers-tablegen Author: Rahul Joshi (jurahul) Changes
Full diff: https://github.com/llvm/llvm-project/pull/125265.diff 1 Files Affected:
diff --git a/llvm/utils/TableGen/InstrInfoEmitter.cpp b/llvm/utils/TableGen/InstrInfoEmitter.cpp
index 55e9d576b9b068..97c00ad4924197 100644
--- a/llvm/utils/TableGen/InstrInfoEmitter.cpp
+++ b/llvm/utils/TableGen/InstrInfoEmitter.cpp
@@ -286,6 +286,7 @@ void InstrInfoEmitter::emitOperandNameMappings(
OS << "enum {\n";
for (const auto &[I, Op] : enumerate(OperandNameToID))
OS << " " << Op.first << " = " << I << ",\n";
+ OS << " OPERAND_LAST = " << NumOperandNames << ",\n";
OS << "};\n";
OS << "} // end namespace llvm::" << Namespace << "::OpName\n";
OS << "#endif //GET_INSTRINFO_OPERAND_ENUM\n\n";
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/7489 Here is the relevant piece of the build log for the reference
|