-
Notifications
You must be signed in to change notification settings - Fork 14.8k
TableGen: Sort RuntimeLibcallImpls secondarily by enum names #150728
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
Merged
arsenm
merged 1 commit into
main
from
users/arsenm/tablegen/sort-runtime-libcall-impls-enum-name
Jul 26, 2025
Merged
TableGen: Sort RuntimeLibcallImpls secondarily by enum names #150728
arsenm
merged 1 commit into
main
from
users/arsenm/tablegen/sort-runtime-libcall-impls-enum-name
Jul 26, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-tablegen Author: Matt Arsenault (arsenm) ChangesExtracted from #150192, this hopefully fixes occasional EXPENSIVE_CHECKS Full diff: https://github.com/llvm/llvm-project/pull/150728.diff 2 Files Affected:
diff --git a/llvm/test/TableGen/RuntimeLibcallEmitter.td b/llvm/test/TableGen/RuntimeLibcallEmitter.td
index 579e3c7dd62ab..783a861cfe756 100644
--- a/llvm/test/TableGen/RuntimeLibcallEmitter.td
+++ b/llvm/test/TableGen/RuntimeLibcallEmitter.td
@@ -95,8 +95,8 @@ def BlahLibrary : SystemRuntimeLibrary<isBlahArch, (add calloc, LibraryWithCondi
// CHECK-NEXT: __lshrdi3 = 4, // __lshrdi3
// CHECK-NEXT: bzero = 5, // bzero
// CHECK-NEXT: calloc = 6, // calloc
-// CHECK-NEXT: sqrtl_f80 = 7, // sqrtl
-// CHECK-NEXT: sqrtl_f128 = 8, // sqrtl
+// CHECK-NEXT: sqrtl_f128 = 7, // sqrtl
+// CHECK-NEXT: sqrtl_f80 = 8, // sqrtl
// CHECK-NEXT: NumLibcallImpls = 9
// CHECK-NEXT: };
// CHECK-NEXT: } // End namespace RTLIB
@@ -157,8 +157,8 @@ def BlahLibrary : SystemRuntimeLibrary<isBlahArch, (add calloc, LibraryWithCondi
// CHECK-NEXT: RTLIB::SRL_I64, // RTLIB::__lshrdi3
// CHECK-NEXT: RTLIB::BZERO, // RTLIB::bzero
// CHECK-NEXT: RTLIB::CALLOC, // RTLIB::calloc
-// CHECK-NEXT: RTLIB::SQRT_F80, // RTLIB::sqrtl_f80
// CHECK-NEXT: RTLIB::SQRT_F128, // RTLIB::sqrtl_f128
+// CHECK-NEXT: RTLIB::SQRT_F80, // RTLIB::sqrtl_f80
// CHECK-NEXT: };
diff --git a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
index 7f90d6b4fdacc..a280604ade2e8 100644
--- a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+++ b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
@@ -242,11 +242,10 @@ class RuntimeLibcallEmitter {
SmallVector<const Record *, 1024> AllRuntimeLibcallImpls(
AllRuntimeLibcallImplsRaw);
- // Sort by libcall impl name, not the enum name. This keeps the order
- // suitable for using the name table for libcall recognition binary search.
- llvm::sort(AllRuntimeLibcallImpls, [](const Record *A, const Record *B) {
- return A->getValueAsString("LibCallFuncName") <
- B->getValueAsString("LibCallFuncName");
+ // Sort by libcall impl name and secondarily by the enum name.
+ sort(AllRuntimeLibcallImpls, [](const Record *A, const Record *B) {
+ return std::pair(A->getValueAsString("LibCallFuncName"), A->getName()) <
+ std::pair(B->getValueAsString("LibCallFuncName"), B->getName());
});
RuntimeLibcallImplDefList.reserve(AllRuntimeLibcallImpls.size());
|
0d55e94
to
f312e74
Compare
Merge activity
|
f312e74
to
2ffcdfe
Compare
I think all the checks passed, and then it started the whole process over? Is it trying to redo tests if anything else already merged to main? |
2ffcdfe
to
b279156
Compare
Extracted from #150192, this hopefully fixes occasional EXPENSIVE_CHECKS failures.
b279156
to
e65c241
Compare
mahesh-attarde
pushed a commit
to mahesh-attarde/llvm-project
that referenced
this pull request
Jul 28, 2025
…0728) Extracted from llvm#150192, this hopefully fixes occasional EXPENSIVE_CHECKS failures.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extracted from #150192, this hopefully fixes occasional EXPENSIVE_CHECKS
failures.