Skip to content

Conversation

@Prabhuk
Copy link
Contributor

@Prabhuk Prabhuk commented Jan 6, 2025

Keep framepointers enabled by default for the default baremetal libc
builds.

Frame pointers help unwind the stack and unwinding without frame pointer
is complex and increaseis the code size. This code size increase is
potentially larger than the savings achieved by disabling frame
pointers. Retaining the original behavior of retaining frame pointers as
the default behavior.

@llvmbot llvmbot added the libc label Jan 6, 2025
@Prabhuk Prabhuk requested a review from petrhosek January 6, 2025 21:09
@llvmbot
Copy link
Member

llvmbot commented Jan 6, 2025

@llvm/pr-subscribers-libc

Author: Prabhuk (Prabhuk)

Changes

Keep framepointers enabled by default for the default baremetal libc
builds.


Full diff: https://github.com/llvm/llvm-project/pull/121836.diff

1 Files Affected:

  • (modified) libc/config/baremetal/config.json (-5)
diff --git a/libc/config/baremetal/config.json b/libc/config/baremetal/config.json
index 85e80879d498e6..08c581d1c68226 100644
--- a/libc/config/baremetal/config.json
+++ b/libc/config/baremetal/config.json
@@ -30,10 +30,5 @@
     "LIBC_CONF_MATH_OPTIMIZATIONS": {
       "value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES)"
     }
-  },
-  "codegen": {
-    "LIBC_CONF_KEEP_FRAME_POINTER": {
-      "value": false
-    }
   }
 }

@nickdesaulniers
Copy link
Member

I don't care either way, but mind putting more info as to why you're reverting this recent addition?

Frame pointers help unwind the stack and unwinding without frame pointer
is complex and increaseis the code size. This code size increase is
potentially larger than the savings achieved by disabling frame
pointers. Retaining the original behavior of retaining frame pointers as
the default behavior.
@Prabhuk
Copy link
Contributor Author

Prabhuk commented Jan 7, 2025

I don't care either way, but mind putting more info as to why you're reverting this recent addition?

Ack. Updated the PR and commit descriptions.

@Prabhuk Prabhuk merged commit 3b19e78 into llvm:main Jan 7, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants