diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2021-06-26 23:53:35 +0300 |
|---|---|---|
| committer | Simonas Kazlauskas <git@kazlauskas.me> | 2021-06-30 19:45:17 +0300 |
| commit | 9b67cba4f6294e0db900397cdf5c59c1dc901ade (patch) | |
| tree | 5f9e9ce96b1e1c32d448d8daa1ba0c9f18bb947e /compiler/rustc_session | |
| parent | 3ddb78a34608848a60f6ca5b6ccfde8340302372 (diff) | |
| download | rust-9b67cba4f6294e0db900397cdf5c59c1dc901ade.tar.gz rust-9b67cba4f6294e0db900397cdf5c59c1dc901ade.zip | |
Add support for leaf fn frame pointer elimination
This PR adds ability for the target specifications to specify frame pointer emission type that's not just “always” or “whatever cg decides”. In particular there's a new mode that allows omission of the frame pointer for leaf functions (those that don't call any other functions). We then set this new mode for Aarch64-based Apple targets. Fixes #86196
Diffstat (limited to 'compiler/rustc_session')
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index d8a58ee18cd..f792e319867 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -792,18 +792,6 @@ impl Session { !self.target.is_like_windows && !self.target.is_like_osx } - pub fn must_not_eliminate_frame_pointers(&self) -> bool { - // "mcount" function relies on stack pointer. - // See <https://sourceware.org/binutils/docs/gprof/Implementation.html>. - if self.instrument_mcount() { - true - } else if let Some(x) = self.opts.cg.force_frame_pointers { - x - } else { - !self.target.eliminate_frame_pointer - } - } - pub fn must_emit_unwind_tables(&self) -> bool { // This is used to control the emission of the `uwtable` attribute on // LLVM functions. |
