TableGen: Go back to using range loop over runtime libcall sets#162221
Merged
arsenm merged 1 commit intoOct 7, 2025
Merged
Conversation
Member
|
@llvm/pr-subscribers-tablegen Author: Matt Arsenault (arsenm) ChangesThis reverts 9c361cc and replaces f490dbd. Instead of using the lambda Full diff: https://github.com/llvm/llvm-project/pull/162221.diff 4 Files Affected:
diff --git a/llvm/test/TableGen/RuntimeLibcallEmitter-calling-conv.td b/llvm/test/TableGen/RuntimeLibcallEmitter-calling-conv.td
index 7ec70b740c01c..98a376bc5c524 100644
--- a/llvm/test/TableGen/RuntimeLibcallEmitter-calling-conv.td
+++ b/llvm/test/TableGen/RuntimeLibcallEmitter-calling-conv.td
@@ -48,39 +48,79 @@ def MSP430LibraryWithCondCC : SystemRuntimeLibrary<isMSP430,
// CHECK-NEXT: Entry = DefaultCC;
// CHECK-NEXT: }
// CHECK-EMPTY:
-// CHECK-NEXT: setLibcallImpl(RTLIB::MALLOC, RTLIB::impl_malloc); // malloc
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls[] = {
+// CHECK-NEXT: {RTLIB::MALLOC, RTLIB::impl_malloc}, // malloc
+// CHECK-NEXT: };
// CHECK-EMPTY:
-// CHECK-NEXT: setLibcallImpl(RTLIB::SDIVREM_I8, RTLIB::impl___divmodqi4); // __divmodqi4
-// CHECK-NEXT: setLibcallImplCallingConv(RTLIB::impl___divmodqi4, CallingConv::AVR_BUILTIN);
-// CHECK-NEXT: setLibcallImpl(RTLIB::UDIVREM_I16, RTLIB::impl___udivmodhi4); // __udivmodhi4
-// CHECK-NEXT: setLibcallImplCallingConv(RTLIB::impl___udivmodhi4, CallingConv::AVR_BUILTIN);
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: }
+// CHECK-EMPTY:
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls_AlwaysAvailable_AVR_BUILTIN[] = {
+// CHECK-NEXT: {RTLIB::SDIVREM_I8, RTLIB::impl___divmodqi4}, // __divmodqi4
+// CHECK-NEXT: {RTLIB::UDIVREM_I16, RTLIB::impl___udivmodhi4}, // __udivmodhi4
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls_AlwaysAvailable_AVR_BUILTIN) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: setLibcallImplCallingConv(Impl, CallingConv::AVR_BUILTIN);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: return;
// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: if (TT.getArch() == Triple::avr) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::MALLOC, RTLIB::impl_malloc); // malloc
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls[] = {
+// CHECK-NEXT: {RTLIB::MALLOC, RTLIB::impl_malloc}, // malloc
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: }
// CHECK-EMPTY:
-// CHECK-NEXT: setLibcallImpl(RTLIB::SDIVREM_I8, RTLIB::impl___divmodqi4); // __divmodqi4
-// CHECK-NEXT: setLibcallImplCallingConv(RTLIB::impl___divmodqi4, CallingConv::AVR_BUILTIN);
-// CHECK-NEXT: setLibcallImpl(RTLIB::UDIVREM_I16, RTLIB::impl___udivmodhi4); // __udivmodhi4
-// CHECK-NEXT: setLibcallImplCallingConv(RTLIB::impl___udivmodhi4, CallingConv::AVR_BUILTIN);
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls_AlwaysAvailable_AVR_BUILTIN[] = {
+// CHECK-NEXT: {RTLIB::SDIVREM_I8, RTLIB::impl___divmodqi4}, // __divmodqi4
+// CHECK-NEXT: {RTLIB::UDIVREM_I16, RTLIB::impl___udivmodhi4}, // __udivmodhi4
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls_AlwaysAvailable_AVR_BUILTIN) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: setLibcallImplCallingConv(Impl, CallingConv::AVR_BUILTIN);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: return;
// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: if (TT.getArch() == Triple::msp430) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::MALLOC, RTLIB::impl_malloc); // malloc
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls[] = {
+// CHECK-NEXT: {RTLIB::MALLOC, RTLIB::impl_malloc}, // malloc
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: if ( isFoo() ) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::SDIVREM_I8, RTLIB::impl___divmodqi4); // __divmodqi4
-// CHECK-NEXT: setLibcallImplCallingConv(RTLIB::impl___divmodqi4, CallingConv::AVR_BUILTIN);
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls_anonymous_3_AVR_BUILTIN[] = {
+// CHECK-NEXT: {RTLIB::SDIVREM_I8, RTLIB::impl___divmodqi4}, // __divmodqi4
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls_anonymous_3_AVR_BUILTIN) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: setLibcallImplCallingConv(Impl, CallingConv::AVR_BUILTIN);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: if ( isBar() ) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::UDIVREM_I16, RTLIB::impl___udivmodhi4); // __udivmodhi4
-// CHECK-NEXT: setLibcallImplCallingConv(RTLIB::impl___udivmodhi4, CallingConv::MSP430_BUILTIN);
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls_anonymous_5_MSP430_BUILTIN[] = {
+// CHECK-NEXT: {RTLIB::UDIVREM_I16, RTLIB::impl___udivmodhi4}, // __udivmodhi4
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls_anonymous_5_MSP430_BUILTIN) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: setLibcallImplCallingConv(Impl, CallingConv::MSP430_BUILTIN);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: }
// CHECK-EMPTY:
diff --git a/llvm/test/TableGen/RuntimeLibcallEmitter-conflict-warning.td b/llvm/test/TableGen/RuntimeLibcallEmitter-conflict-warning.td
index 112c33e3e3c47..136c81b967d47 100644
--- a/llvm/test/TableGen/RuntimeLibcallEmitter-conflict-warning.td
+++ b/llvm/test/TableGen/RuntimeLibcallEmitter-conflict-warning.td
@@ -25,7 +25,9 @@ def dup1 : RuntimeLibcallImpl<ANOTHER_DUP>;
// func_a and func_b both provide SOME_FUNC.
// CHECK: if (isTargetArchA()) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::SOME_FUNC, RTLIB::impl_func_b); // func_b
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls[] = {
+// CHECK-NEXT: {RTLIB::SOME_FUNC, RTLIB::impl_func_b}, // func_b
+// CHECK-NEXT: };
// ERR: :[[@LINE+1]]:5: warning: conflicting implementations for libcall SOME_FUNC: func_b, func_a
def TheSystemLibraryA : SystemRuntimeLibrary<isTargetArchA,
@@ -33,8 +35,10 @@ def TheSystemLibraryA : SystemRuntimeLibrary<isTargetArchA,
>;
// CHECK: if (isTargetArchB()) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::OTHER_FUNC, RTLIB::impl_other_func); // other_func
-// CHECK-NEXT: setLibcallImpl(RTLIB::SOME_FUNC, RTLIB::impl_func_a); // func_a
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls[] = {
+// CHECK-NEXT: {RTLIB::OTHER_FUNC, RTLIB::impl_other_func}, // other_func
+// CHECK-NEXT: {RTLIB::SOME_FUNC, RTLIB::impl_func_a}, // func_a
+// CHECK-NEXT: };
// ERR: :[[@LINE+1]]:5: warning: conflicting implementations for libcall SOME_FUNC: func_a, func_b
def TheSystemLibraryB : SystemRuntimeLibrary<isTargetArchB,
@@ -42,9 +46,11 @@ def TheSystemLibraryB : SystemRuntimeLibrary<isTargetArchB,
>;
// CHECK: if (isTargetArchC()) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::ANOTHER_DUP, RTLIB::impl_dup1); // dup1
-// CHECK-NEXT: setLibcallImpl(RTLIB::OTHER_FUNC, RTLIB::impl_other_func); // other_func
-// CHECK-NEXT: setLibcallImpl(RTLIB::SOME_FUNC, RTLIB::impl_func_a); // func_a
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls[] = {
+// CHECK-NEXT: {RTLIB::ANOTHER_DUP, RTLIB::impl_dup1}, // dup1
+// CHECK-NEXT: {RTLIB::OTHER_FUNC, RTLIB::impl_other_func}, // other_func
+// CHECK-NEXT: {RTLIB::SOME_FUNC, RTLIB::impl_func_a}, // func_a
+// CHECK-NEXT: };
// ERR: :[[@LINE+3]]:5: warning: conflicting implementations for libcall ANOTHER_DUP: dup1, dup0
// ERR: :[[@LINE+2]]:5: warning: conflicting implementations for libcall SOME_FUNC: func_a, func_b
diff --git a/llvm/test/TableGen/RuntimeLibcallEmitter.td b/llvm/test/TableGen/RuntimeLibcallEmitter.td
index f4577f89ed618..c336fee956ce1 100644
--- a/llvm/test/TableGen/RuntimeLibcallEmitter.td
+++ b/llvm/test/TableGen/RuntimeLibcallEmitter.td
@@ -190,20 +190,42 @@ def BlahLibrary : SystemRuntimeLibrary<isBlahArch, (add calloc, LibraryWithCondi
// CHECK-NEXT: }
// CHECK: void llvm::RTLIB::RuntimeLibcallsInfo::setTargetRuntimeLibcallSets(const llvm::Triple &TT, ExceptionHandling ExceptionModel, FloatABI::ABIType FloatABI, EABI EABIVersion, StringRef ABIName) {
+// CHECK-NEXT: struct LibcallImplPair {
+// CHECK-NEXT: RTLIB::Libcall Func;
+// CHECK-NEXT: RTLIB::LibcallImpl Impl;
+// CHECK-NEXT: };
// CHECK-EMPTY:
// CHECK-NEXT: if (TT.getArch() == Triple::blah) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::BZERO, RTLIB::impl_bzero); // bzero
-// CHECK-NEXT: setLibcallImpl(RTLIB::CALLOC, RTLIB::impl_calloc); // calloc
-// CHECK-NEXT: setLibcallImpl(RTLIB::SQRT_F128, RTLIB::impl_sqrtl_f128); // sqrtl
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls[] = {
+// CHECK-NEXT: {RTLIB::BZERO, RTLIB::impl_bzero}, // bzero
+// CHECK-NEXT: {RTLIB::CALLOC, RTLIB::impl_calloc}, // calloc
+// CHECK-NEXT: {RTLIB::SQRT_F128, RTLIB::impl_sqrtl_f128}, // sqrtl
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: if (TT.hasCompilerRT()) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::SHL_I32, RTLIB::impl___ashlsi3); // __ashlsi3
-// CHECK-NEXT: setLibcallImpl(RTLIB::SRL_I64, RTLIB::impl___lshrdi3); // __lshrdi3
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls_hasCompilerRT[] = {
+// CHECK-NEXT: {RTLIB::SHL_I32, RTLIB::impl___ashlsi3}, // __ashlsi3
+// CHECK-NEXT: {RTLIB::SRL_I64, RTLIB::impl___lshrdi3}, // __lshrdi3
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls_hasCompilerRT) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: if (TT.getOS() == Triple::bar) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::MEMSET, RTLIB::impl____memset); // ___memset
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls_isBarOS[] = {
+// CHECK-NEXT: {RTLIB::MEMSET, RTLIB::impl____memset}, // ___memset
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls_isBarOS) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: }
// CHECK-EMPTY:
@@ -211,19 +233,37 @@ def BlahLibrary : SystemRuntimeLibrary<isBlahArch, (add calloc, LibraryWithCondi
// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: if (TT.getArch() == Triple::buzz) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::SHL_I32, RTLIB::impl___ashlsi3); // __ashlsi3
-// CHECK-NEXT: setLibcallImpl(RTLIB::SQRT_F80, RTLIB::impl_sqrtl_f80); // sqrtl
-// CHECK-NEXT: setLibcallImpl(RTLIB::SRL_I64, RTLIB::impl___lshrdi3); // __lshrdi3
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls[] = {
+// CHECK-NEXT: {RTLIB::SHL_I32, RTLIB::impl___ashlsi3}, // __ashlsi3
+// CHECK-NEXT: {RTLIB::SQRT_F80, RTLIB::impl_sqrtl_f80}, // sqrtl
+// CHECK-NEXT: {RTLIB::SRL_I64, RTLIB::impl___lshrdi3}, // __lshrdi3
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: return;
// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: if (TT.getArch() == Triple::foo) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::BZERO, RTLIB::impl_bzero); // bzero
-// CHECK-NEXT: setLibcallImpl(RTLIB::SQRT_F128, RTLIB::impl_sqrtl_f128); // sqrtl
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls[] = {
+// CHECK-NEXT: {RTLIB::BZERO, RTLIB::impl_bzero}, // bzero
+// CHECK-NEXT: {RTLIB::SQRT_F128, RTLIB::impl_sqrtl_f128}, // sqrtl
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: if (TT.getOS() == Triple::bar) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::MEMSET, RTLIB::impl____memset); // ___memset
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls_isBarOS[] = {
+// CHECK-NEXT: {RTLIB::MEMSET, RTLIB::impl____memset}, // ___memset
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls_isBarOS) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: }
// CHECK-EMPTY:
@@ -231,10 +271,16 @@ def BlahLibrary : SystemRuntimeLibrary<isBlahArch, (add calloc, LibraryWithCondi
// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: if (TT.getArch() == Triple::simple) {
-// CHECK-NEXT: setLibcallImpl(RTLIB::CALLOC, RTLIB::impl_calloc); // calloc
-// CHECK-NEXT: setLibcallImpl(RTLIB::SHL_I32, RTLIB::impl___ashlsi3); // __ashlsi3
-// CHECK-NEXT: setLibcallImpl(RTLIB::SQRT_F80, RTLIB::impl_sqrtl_f80); // sqrtl
-// CHECK-NEXT: setLibcallImpl(RTLIB::SRL_I64, RTLIB::impl___lshrdi3); // __lshrdi3
+// CHECK-NEXT: static const LibcallImplPair LibraryCalls[] = {
+// CHECK-NEXT: {RTLIB::CALLOC, RTLIB::impl_calloc}, // calloc
+// CHECK-NEXT: {RTLIB::SHL_I32, RTLIB::impl___ashlsi3}, // __ashlsi3
+// CHECK-NEXT: {RTLIB::SQRT_F80, RTLIB::impl_sqrtl_f80}, // sqrtl
+// CHECK-NEXT: {RTLIB::SRL_I64, RTLIB::impl___lshrdi3}, // __lshrdi3
+// CHECK-NEXT: };
+// CHECK-EMPTY:
+// CHECK-NEXT: for (const auto [Func, Impl] : LibraryCalls) {
+// CHECK-NEXT: setLibcallImpl(Func, Impl);
+// CHECK-NEXT: }
// CHECK-EMPTY:
// CHECK-NEXT: return;
// CHECK-NEXT: }
diff --git a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
index c96331c3bb77d..10f02134d03b5 100644
--- a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+++ b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
@@ -543,8 +543,11 @@ void RuntimeLibcallEmitter::emitSystemRuntimeLibrarySetCalls(
OS << "void llvm::RTLIB::RuntimeLibcallsInfo::setTargetRuntimeLibcallSets("
"const llvm::Triple &TT, ExceptionHandling ExceptionModel, "
"FloatABI::ABIType FloatABI, EABI EABIVersion, "
- "StringRef ABIName) {\n";
-
+ "StringRef ABIName) {\n"
+ " struct LibcallImplPair {\n"
+ " RTLIB::Libcall Func;\n"
+ " RTLIB::LibcallImpl Impl;\n"
+ " };\n";
ArrayRef<const Record *> AllLibs =
Records.getAllDerivedDefinitions("SystemRuntimeLibrary");
@@ -669,20 +672,36 @@ void RuntimeLibcallEmitter::emitSystemRuntimeLibrarySetCalls(
Funcs.erase(UniqueI, Funcs.end());
- StringRef CCEnum;
+ OS << indent(IndentDepth + 2)
+ << "static const LibcallImplPair LibraryCalls";
+ SubsetPredicate.emitTableVariableNameSuffix(OS);
if (FuncsWithCC.CallingConv)
- CCEnum = FuncsWithCC.CallingConv->getValueAsString("CallingConv");
+ OS << '_' << FuncsWithCC.CallingConv->getName();
+ OS << "[] = {\n";
for (const RuntimeLibcallImpl *LibCallImpl : Funcs) {
- OS << indent(IndentDepth + 2);
- LibCallImpl->emitSetImplCall(OS);
+ OS << indent(IndentDepth + 6);
+ LibCallImpl->emitTableEntry(OS);
+ }
- if (FuncsWithCC.CallingConv) {
- OS << indent(IndentDepth + 2) << "setLibcallImplCallingConv(";
- LibCallImpl->emitEnumEntry(OS);
- OS << ", " << CCEnum << ");\n";
- }
+ OS << indent(IndentDepth + 2) << "};\n\n"
+ << indent(IndentDepth + 2)
+ << "for (const auto [Func, Impl] : LibraryCalls";
+ SubsetPredicate.emitTableVariableNameSuffix(OS);
+ if (FuncsWithCC.CallingConv)
+ OS << '_' << FuncsWithCC.CallingConv->getName();
+
+ OS << ") {\n"
+ << indent(IndentDepth + 4) << "setLibcallImpl(Func, Impl);\n";
+
+ if (FuncsWithCC.CallingConv) {
+ StringRef CCEnum =
+ FuncsWithCC.CallingConv->getValueAsString("CallingConv");
+ OS << indent(IndentDepth + 4) << "setLibcallImplCallingConv(Impl, "
+ << CCEnum << ");\n";
}
+
+ OS << indent(IndentDepth + 2) << "}\n";
OS << '\n';
if (!SubsetPredicate.isAlwaysAvailable()) {
|
MacDue
approved these changes
Oct 7, 2025
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/116/builds/19362 Here is the relevant piece of the build log for the reference |
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
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.

This reverts 9c361cc and replaces f490dbd. Instead of using the lambda
to try avoid naming the variables, just disambiguate the different AlwaysAvailable
sets with the calling convention name.