Skip to content
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

Always add the frame-pointer=all attribute #57209

Merged
merged 1 commit into from
Feb 8, 2025
Merged
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: 1 addition & 16 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,6 @@

using namespace llvm;

static bool jl_fpo_disabled(const Triple &TT) {
#ifdef JL_DISABLE_FPO
return true;
#endif
#ifdef _COMPILER_MSAN_ENABLED_
// MSAN doesn't support FPO
return true;
#endif
if (TT.isOSLinux() || TT.isOSWindows() || TT.isOSFreeBSD() || TT.isOSOpenBSD()) {
return true;
}
return false;
}

static bool jl_floattemp_var_needed(const Triple &TT) {
#ifdef JL_NEED_FLOATTEMP_VAR
return true;
Expand Down Expand Up @@ -2969,8 +2955,7 @@ void jl_init_function(Function *F, const Triple &TT)
if (TT.isOSWindows() && TT.getArch() == Triple::x86_64) {
attr.addUWTableAttr(llvm::UWTableKind::Default); // force NeedsWinEH
}
if (jl_fpo_disabled(TT))
attr.addAttribute("frame-pointer", "all");
attr.addAttribute("frame-pointer", "all");
if (!TT.isOSWindows()) {
#if !defined(_COMPILER_ASAN_ENABLED_)
// ASAN won't like us accessing undefined memory causing spurious issues,
Expand Down