[PATCH] D31972: Do not force the frame pointer by default for ARM EABI

Christian Bruel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 12 00:51:56 PDT 2017


chrib created this revision.
Herald added a subscriber: aemerson.

Do not force the frame pointer by default for ARM EABI

(bugzilla #32501)


https://reviews.llvm.org/D31972

Files:
  lib/Driver/ToolChains/Clang.cpp


Index: lib/Driver/ToolChains/Clang.cpp
===================================================================
--- lib/Driver/ToolChains/Clang.cpp
+++ lib/Driver/ToolChains/Clang.cpp
@@ -566,6 +566,18 @@
     }
   }
 
+
+  if (Triple.getEnvironment() == llvm::Triple::EABI) {
+    switch (Triple.getArch()) {
+    case llvm::Triple::arm:
+    case llvm::Triple::thumb:
+      // ARM EABI doesn't require a frame pointer
+      return !areOptimizationsEnabled(Args);
+    default:
+      return true;
+    }
+  }
+
   return true;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31972.94939.patch
Type: text/x-patch
Size: 531 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170412/b9fc6a87/attachment.bin>


More information about the cfe-commits mailing list