Always add the frame-pointer=all attribute#57209
Merged
oscardssmith merged 1 commit intoJuliaLang:masterfrom Feb 8, 2025
Merged
Always add the frame-pointer=all attribute#57209oscardssmith merged 1 commit intoJuliaLang:masterfrom
oscardssmith merged 1 commit intoJuliaLang:masterfrom
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.
Member
|
What's the user-facing consequence for this change? |
gbaraldi
approved these changes
Jan 30, 2025
Member
|
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 |
Member
|
Should affect macos only |
Member
Author
|
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:
|
vchuravy
approved these changes
Feb 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: