On Wed, Jul 24, 2013 at 5:32 PM, Bill Wendling <[email protected]> wrote: > Author: void > Date: Wed Jul 24 19:32:41 2013 > New Revision: 187092 > > URL: http://llvm.org/viewvc/llvm-project?rev=187092&view=rev > Log: > Replace the "NoFramePointerElimNonLeaf" target option with a function > attribute. > > Modified: > cfe/trunk/lib/CodeGen/BackendUtil.cpp > cfe/trunk/lib/CodeGen/CGCall.cpp > > Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=187092&r1=187091&r2=187092&view=diff > ============================================================================== > --- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original) > +++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Wed Jul 24 19:32:41 2013 > @@ -412,13 +412,10 @@ TargetMachine *EmitAssemblyHelper::Creat > // Set frame pointer elimination mode. > if (!CodeGenOpts.DisableFPElim) { > Options.NoFramePointerElim = false; > - Options.NoFramePointerElimNonLeaf = false; > } else if (CodeGenOpts.OmitLeafFramePointer) { > Options.NoFramePointerElim = false; > - Options.NoFramePointerElimNonLeaf = true; > } else { > Options.NoFramePointerElim = true; > - Options.NoFramePointerElimNonLeaf = true; > } > > if (CodeGenOpts.UseInitArray) > > Modified: cfe/trunk/lib/CodeGen/CGCall.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=187092&r1=187091&r2=187092&view=diff > ============================================================================== > --- cfe/trunk/lib/CodeGen/CGCall.cpp (original) > +++ cfe/trunk/lib/CodeGen/CGCall.cpp Wed Jul 24 19:32:41 2013 > @@ -1072,6 +1072,18 @@ void CodeGenModule::ConstructAttributeLi > CodeGenOpts.SoftFloat ? "true" : "false"); > FuncAttrs.addAttribute("stack-protector-buffer-size", > llvm::utostr(CodeGenOpts.SSPBufferSize)); > + > + bool NoFramePointerElimNonLeaf; > + if (!CodeGenOpts.DisableFPElim) { > + NoFramePointerElimNonLeaf = false; > + } else if (CodeGenOpts.OmitLeafFramePointer) { > + NoFramePointerElimNonLeaf = true; > + } else { > + NoFramePointerElimNonLeaf = true; > + } > + > + FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf", > + NoFramePointerElimNonLeaf ? "true" : "false");
I assume we have a utility for bool->StringRef? If not, I imagine we're going to want/need one by the time you're done making similar changes to other attributes. > } > > QualType RetTy = FI.getReturnType(); > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
