Skip to content

Commit 4bdcf5b

Browse files
authored
AArch64: Stop using StringSaver for runtime libcall names (#142544)
This redoes 43ba568 to avoid the statefulness.
1 parent f4ca6d9 commit 4bdcf5b

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,14 +1984,15 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
19841984
setOperationAction(Op, MVT::f16, Promote);
19851985

19861986
if (Subtarget->isWindowsArm64EC()) {
1987-
// FIXME: are there intrinsics we need to exclude from this?
1988-
for (int i = 0; i < RTLIB::UNKNOWN_LIBCALL; ++i) {
1989-
auto code = static_cast<RTLIB::Libcall>(i);
1990-
auto libcallName = getLibcallName(code);
1991-
if ((libcallName != nullptr) && (libcallName[0] != '#')) {
1992-
setLibcallName(code, Saver.save(Twine("#") + libcallName).data());
1993-
}
1994-
}
1987+
// FIXME: are there calls we need to exclude from this?
1988+
#define HANDLE_LIBCALL(code, name) \
1989+
{ \
1990+
const char *libcallName = getLibcallName(RTLIB::code); \
1991+
if (libcallName && libcallName[0] != '#') \
1992+
setLibcallName(RTLIB::code, "#" #name); \
1993+
}
1994+
#include "llvm/IR/RuntimeLibcalls.def"
1995+
#undef HANDLE_LIBCALL
19951996
}
19961997
}
19971998

llvm/lib/Target/AArch64/AArch64ISelLowering.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,6 @@ class AArch64TargetLowering : public TargetLowering {
540540
/// make the right decision when generating code for different targets.
541541
const AArch64Subtarget *Subtarget;
542542

543-
llvm::BumpPtrAllocator BumpAlloc;
544-
llvm::StringSaver Saver{BumpAlloc};
545-
546543
bool isExtFreeImpl(const Instruction *Ext) const override;
547544

548545
void addTypeForNEON(MVT VT);

0 commit comments

Comments
 (0)