[clang] Enable frame pointer for non-leaf functions on Android (PR #97614)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 23 13:03:02 PDT 2024
================
@@ -166,7 +155,7 @@ static bool useFramePointerForTargetByDefault(const llvm::opt::ArgList &Args,
static bool useLeafFramePointerForTargetByDefault(const llvm::Triple &Triple) {
if (Triple.isAArch64() || Triple.isPS() || Triple.isVE() ||
- (Triple.isAndroid() && Triple.isRISCV64()))
+ (Triple.isAndroid() && !Triple.isARM()))
----------------
yabinc wrote:
I didn't intentionally remove frame pointer for leaf functions for thumb in Android. But I also don't have reason to add it back:
1. On Android, we can't rely on stack frame pointer based unwinding for arm32 binaries. Because arm and thumb use different registers as frame pointers.
2. On other architectures that we want to support stack frame pointer based unwinding (aarch64, riscv64, x86_64), we don't need frame pointer for leaf functions.
https://github.com/llvm/llvm-project/pull/97614
More information about the cfe-commits
mailing list