-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
base: master
Are you sure you want to change the base?
Conversation
At some point LLVM on MacOS started doing frame pointer optimization by default. Ask for a frame pointer on every function, on all platforms.
What's the user-facing consequence for this change? |
I don't see much difference on aarch64-linux on this PR: julia> versioninfo()
Julia Version 1.12.0-DEV.1955
Commit 5256457fc45 (2025-01-30 21:23 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: Linux (aarch64-linux-gnu)
CPU: 72 × unknown
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, neoverse-v2)
GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 72 virtual cores)
julia> @code_native ((x,y) -> Core.Intrinsics.add_float(x,y))(1.0,2.0) .text
.file "#5"
.globl "julia_#5_2248" // -- Begin function julia_#5_2248
.p2align 4
.type "julia_#5_2248",@function
"julia_#5_2248": // @"julia_#5_2248"
; Function Signature: var"#5"(Float64, Float64)
; ┌ @ REPL[4]:1 within `#5`
// %bb.0: // %top
//DEBUG_VALUE: #5:x <- $d0
//DEBUG_VALUE: #5:x <- $d0
//DEBUG_VALUE: #5:y <- $d1
//DEBUG_VALUE: #5:y <- $d1
stp x29, x30, [sp, #-16]! // 16-byte Folded Spill
mov x29, sp
fadd d0, d0, d1
ldp x29, x30, [sp], #16 // 16-byte Folded Reload
ret
.Lfunc_end0:
.size "julia_#5_2248", .Lfunc_end0-"julia_#5_2248"
; └
// -- End function
.type ".L+Core.Float64#2250",@object // @"+Core.Float64#2250"
.section .rodata,"a",@progbits
.p2align 3, 0x0
".L+Core.Float64#2250":
.xword ".L+Core.Float64#2250.jit"
.size ".L+Core.Float64#2250", 8
.set ".L+Core.Float64#2250.jit", 281472563526608
.size ".L+Core.Float64#2250.jit", 8
.section ".note.GNU-stack","",@progbits |
Should affect macos only |
I can't find official documentation on what the apple profiling tools expect, but apple clang on arm includes
If we don't add this attribute, the default varies by platform: CommonArgs.cpp:
|
At some point LLVM on MacOS started doing frame pointer optimization by default. We should ask for a frame pointer on every function, on all platforms.
Prior to this change, on
1.11.3+0.aarch64.apple.darwin14
:Prior to this change, on
1.11.3+0.aarch64.linux.gnu
: