Skip to content

AArch64: Stop using StringSaver for runtime libcall names #142544

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
3 changes: 0 additions & 3 deletions llvm/lib/Target/AArch64/AArch64ISelLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,6 @@ class AArch64TargetLowering : public TargetLowering {
/// 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);
Expand Down
Loading