Do not force the frame pointer by default for ARM EABI
(bugzilla #32501)
Differential D31972
Do not force the frame pointer by default for ARM EABI chrib on Apr 12 2017, 12:51 AM. Authored by
Details
Do not force the frame pointer by default for ARM EABI (bugzilla #32501)
Diff Detail
Event TimelineComment Actions
Add test case
Comment Actions
Comment Actions Please start a thread on cfe-dev about this; most developers don't read cfe-commits, and thinking about it a bit more, I'm not confident omitting frame pointers is really a good default. I would guess there's existing code which depends on frame pointers to come up with a stack trace, since table-based unwinding is complicated and takes up a lot of space. Grepping over the in-tree tests, it looks like the "eabi" triples used in practice are "arm-non-eabi", "arm-netbsd-eabi" and variants of "thumbv7m-apple-darwin-eabi" (and variants of those). Please make sure you aren't changing the behavior of netbsd and "Darwin" targets. Comment Actions OK, I have created a RFE tracker (BZ #32501). I will forward to cfe-dev. Regarding the need to avoid table-based unwinding, the way to handle those request for an explicit frame pointer when not required by the ABI is to use -fno-omit-frame-pointer flag, catching up with the GCC behavior. Also I'm not sure that the unwind table space is such an issue (for debugging) since they are not loadable. Other uses such as profiling is not be impacted by the change, and exceptions unwinder likelibgcc or libunwind should work without the frame pointer I'll amend the patch to check for Darwin and Netbsd. Comment Actions Actually, for NetBSD we want to use -fomit-frame-pointer by default whenever the implicit -funwind-tables is also present. In general, that should be the justification for the default behavior: "Can I reliably unwind a binary with the available information?" Performance of stack unwinding is IMO secondary and users of sanitizers can disable it where necessary. |
Specifically checking for "llvm::Triple::EABI" is suspicious... what are you trying to distinguish?