diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-10-03 03:39:28 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-10-03 03:39:28 +0000 |
commit | a8180a238c1300d1ad8fc3d352fd2f3b4f3f8ebc (patch) | |
tree | 48538a3add63f12b8db620d9c08e439ba789e574 /clang/lib | |
parent | ca95c286f050ab3baf2ad418cb4a196f4b10d632 (diff) | |
download | bcm5719-llvm-a8180a238c1300d1ad8fc3d352fd2f3b4f3f8ebc.tar.gz bcm5719-llvm-a8180a238c1300d1ad8fc3d352fd2f3b4f3f8ebc.zip |
Driver: follow WoA ABI recommendations
The Windows on ARM ABI recommends that FPO be disabled. This is since the
Windows on ARM ABI uses the FP for fast stack walking. By paying the slight
cost of the loss of registers, a much faster backtrace is possible by using the
frame pointer since the pdata need not be consulted. Furthermore, even if pdata
is not available, you can still more easily reconstruct the stack.
llvm-svn: 249227
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index f20e5cd8ef8..7cccf09665c 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -2655,6 +2655,10 @@ static bool shouldUseFramePointerForTarget(const ArgList &Args, switch (Triple.getArch()) { case llvm::Triple::x86: return !areOptimizationsEnabled(Args); + case llvm::Triple::arm: + case llvm::Triple::thumb: + // Windows on ARM builds with FPO disabled to aid fast stack walking + return true; default: // All other supported Windows ISAs use xdata unwind information, so frame // pointers are not generally useful. |