Skip to content

Commit ce498d6

Browse files
MaskRayKeno
authored andcommitted
Use function attribute "frame-pointer" instead of "no-frame-pointer-elim" on LLVM 8+ (#34193)
LLVM 8 (D56351) introduced "frame-pointer" which was intended to replace "no-frame-pointer-elim"/"no-frame-pointer-elim-non-leaf".
1 parent f6b5e8a commit ce498d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/jitlayers.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,11 @@ void jl_init_function(Function *F)
830830
F->setHasUWTable(); // force NeedsWinEH
831831
#endif
832832
#ifdef JL_DISABLE_FPO
833+
#if LLVM_VERSION_MAJOR >= 8
834+
F->addFnAttr("frame-pointer", "all");
835+
#else
833836
F->addFnAttr("no-frame-pointer-elim", "true");
837+
#endif
834838
#endif
835839
// record the WIP name
836840
incomplete_fname.insert(F->getName());

0 commit comments

Comments
 (0)