Apple platforms: Disabled frame pointer elimination causes perf issues and is not in line with what clang does #86196
Labels
A-codegen
Area: Code generation
C-bug
Category: This is a bug.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
O-ios
Operating system: iOS
O-macos
Operating system: macOS
P-high
High priority
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
PR #85706 causes
massiveperformance issues for not-inlined leaf functions since the frame pointer and the link register are now always saved and restored at the beginning and end of a function, even if this function e.g. just returns a constant. In contrast to the PR description this is not what clang does on Macos aarch64. The clang default on Macos is"frame-pointer"="non-leaf"
instead.E.g. clang compiles
to this LLVM IR (with
clang -c test.c -S -emit-llvm -O3
)which leads to this assembly:
Since the inclusion of the PR Rust Nightly sets
"frame-pointer"="all"
, which causes this assembly to be generated:@jrmuizel: FYI
The text was updated successfully, but these errors were encountered: