[PATCH] [PATCH] Stop resetting NoFramePointerElim in TargetMachine::resetTargetOptions

Akira Hatanaka ahatanak at gmail.com
Fri May 22 16:35:50 PDT 2015




================
Comment at: include/llvm/CodeGen/CommandFlags.h:233
@@ -232,2 +232,3 @@
   Options.NoFramePointerElim = DisableFPElim;
+  Options.NoFramePointerElimOverride = DisableFPElim.getNumOccurrences() > 0;
   Options.AllowFPOpFusion = FuseFPOps;
----------------
echristo wrote:
> Should be possible to get rid of this now and just check the command line option?
If we get rid of this, we can't distinguish between the case where "-disable-fp-elim" was not provided at all on the command line and the case where "-disable-fp-elim=false" was provided. For both cases, NoFramePointerElim would evaluate to false.

Or perhaps I'm missing some obvious way to do this?

================
Comment at: lib/ExecutionEngine/ExecutionEngineBindings.cpp:185
@@ -182,1 +184,3 @@
+  if (Mod)
+    setFunctionAttributes("", "", targetOptions, *Mod, true);
 
----------------
echristo wrote:
> Comment the true argument, (and probably why we're not setting the first two arguments as well).
OK, will fix.

================
Comment at: test/CodeGen/X86/2014-08-29-CompactUnwind.ll:1
@@ -1,2 +1,2 @@
-; RUN: llc < %s -disable-fp-elim -mtriple x86_64-apple-darwin11 -mcpu corei7 -filetype=obj -o - | llvm-objdump -d -unwind-info -s - | FileCheck %s
+; RUN: llc < %s -mtriple x86_64-apple-darwin11 -mcpu corei7 -filetype=obj -o - | llvm-objdump -d -unwind-info -s - | FileCheck %s
 ; Regression test for http://llvm.org/bugs/show_bug.cgi?id=20800.
----------------
echristo wrote:
> Should probably make this commit separately?
Yes, this should be separate. Probably the changes I made to overrideFunctionAttribute can be a separate commit too.

================
Comment at: tools/llc/llc.cpp:308
@@ -307,3 +307,3 @@
   // Override function attributes.
-  overrideFunctionAttributes(CPUStr, FeaturesStr, *M);
+  setFunctionAttributes(CPUStr, FeaturesStr, Options, *M, false);
 
----------------
echristo wrote:
> Comment the false argument.
Will fix.

http://reviews.llvm.org/D9830

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list