aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2025-06-03 22:58:24 +0200
committerGitHub <noreply@github.com>2025-06-04 05:58:24 +0900
commit4bdcf5b51f9ea0fa30cfa2279d0943faf5446ecf (patch)
treeb1b66ebfc4eaafb8c8ea29df880fbc1fa8b4c0b0 /llvm/lib
parentf4ca6d9f7115d3bcecdf25f73afc5516c97f9f58 (diff)
downloadllvm-4bdcf5b51f9ea0fa30cfa2279d0943faf5446ecf.zip
llvm-4bdcf5b51f9ea0fa30cfa2279d0943faf5446ecf.tar.gz
llvm-4bdcf5b51f9ea0fa30cfa2279d0943faf5446ecf.tar.bz2
AArch64: Stop using StringSaver for runtime libcall names (#142544)
This redoes 43ba568daac098b286e1c1207deadd1f59d56cd7 to avoid the statefulness.
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelLowering.cpp17
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelLowering.h3
2 files changed, 9 insertions, 11 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index c6f9c9a8..9f51cae 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -1984,14 +1984,15 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
setOperationAction(Op, MVT::f16, Promote);
if (Subtarget->isWindowsArm64EC()) {
- // FIXME: are there intrinsics we need to exclude from this?
- for (int i = 0; i < RTLIB::UNKNOWN_LIBCALL; ++i) {
- auto code = static_cast<RTLIB::Libcall>(i);
- auto libcallName = getLibcallName(code);
- if ((libcallName != nullptr) && (libcallName[0] != '#')) {
- setLibcallName(code, Saver.save(Twine("#") + libcallName).data());
- }
- }
+ // FIXME: are there calls we need to exclude from this?
+#define HANDLE_LIBCALL(code, name) \
+ { \
+ const char *libcallName = getLibcallName(RTLIB::code); \
+ if (libcallName && libcallName[0] != '#') \
+ setLibcallName(RTLIB::code, "#" #name); \
+ }
+#include "llvm/IR/RuntimeLibcalls.def"
+#undef HANDLE_LIBCALL
}
}
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.h b/llvm/lib/Target/AArch64/AArch64ISelLowering.h
index 450e2ef..b217448 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.h
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.h
@@ -540,9 +540,6 @@ private:
/// make the right decision when generating code for different targets.
const AArch64Subtarget *Subtarget;
- llvm::BumpPtrAllocator BumpAlloc;
- llvm::StringSaver Saver{BumpAlloc};
-
bool isExtFreeImpl(const Instruction *Ext) const override;
void addTypeForNEON(MVT VT);