Replace "no-frame-pointer-*" function attributes with "frame-pointer"
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 14 Jan 2019 10:55:55 +0000 (10:55 +0000)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 14 Jan 2019 10:55:55 +0000 (10:55 +0000)
commitb7cef81fd36c85e52b115b9ed6d1fb92d63781d6
treea5434c1d3839d8a5176c53631c6110b41cc8b55c
parentd37be4b7797fa5766df77a40d883afcdbc18fc45
Replace "no-frame-pointer-*" function attributes with "frame-pointer"

Part of the effort to refactoring frame pointer code generation. We used
to use two function attributes "no-frame-pointer-elim" and
"no-frame-pointer-elim-non-leaf" to represent three kinds of frame
pointer usage: (all) frames use frame pointer, (non-leaf) frames use
frame pointer, (none) frame use frame pointer. This CL makes the idea
explicit by using only one enum function attribute "frame-pointer"

Option "-frame-pointer=" replaces "-disable-fp-elim" for tools such as
llc.

"no-frame-pointer-elim" and "no-frame-pointer-elim-non-leaf" are still
supported for easy migration to "frame-pointer".

tests are mostly updated with

// replace command line args ‘-disable-fp-elim=false’ with ‘-frame-pointer=none’
grep -iIrnl '\-disable-fp-elim=false' * | xargs sed -i '' -e "s/-disable-fp-elim=false/-frame-pointer=none/g"

// replace command line args ‘-disable-fp-elim’ with ‘-frame-pointer=all’
grep -iIrnl '\-disable-fp-elim' * | xargs sed -i '' -e "s/-disable-fp-elim/-frame-pointer=all/g"

Patch by Yuanfang Chen (tabloid.adroit)!

Differential Revision: https://reviews.llvm.org/D56351

llvm-svn: 351049
154 files changed:
llvm/docs/CommandGuide/llc.rst
llvm/include/llvm/CodeGen/CommandFlags.inc
llvm/include/llvm/CodeGen/TargetFrameLowering.h
llvm/include/llvm/Support/CodeGen.h
llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
llvm/lib/CodeGen/TargetOptionsImpl.cpp
llvm/lib/Target/ARM/ARMFrameLowering.cpp
llvm/lib/Target/ARM/ARMFrameLowering.h
llvm/test/CodeGen/AArch64/aarch64-dynamic-stack-layout.ll
llvm/test/CodeGen/AArch64/addr-of-ret-addr.ll
llvm/test/CodeGen/AArch64/arm64-abi_align.ll
llvm/test/CodeGen/AArch64/arm64-fast-isel-alloca.ll
llvm/test/CodeGen/AArch64/arm64-fast-isel-call.ll
llvm/test/CodeGen/AArch64/arm64-hello.ll
llvm/test/CodeGen/AArch64/arm64-large-frame.ll
llvm/test/CodeGen/AArch64/arm64-shrink-wrapping.ll
llvm/test/CodeGen/AArch64/emutls.ll
llvm/test/CodeGen/AArch64/f16-instructions.ll
llvm/test/CodeGen/AArch64/fastcc.ll
llvm/test/CodeGen/AArch64/local_vars.ll
llvm/test/CodeGen/AArch64/regress-tblgen-chains.ll
llvm/test/CodeGen/AArch64/regress-w29-reserved-with-fp.ll
llvm/test/CodeGen/AArch64/sponentry.ll
llvm/test/CodeGen/AArch64/stack-guard-remat-bitcast.ll
llvm/test/CodeGen/AArch64/swifterror.ll
llvm/test/CodeGen/ARM/2009-08-21-PostRAKill2.ll
llvm/test/CodeGen/ARM/2009-08-21-PostRAKill3.ll
llvm/test/CodeGen/ARM/2011-03-10-DAGCombineCrash.ll
llvm/test/CodeGen/ARM/2011-03-15-LdStMultipleBug.ll
llvm/test/CodeGen/ARM/2011-03-23-PeepholeBug.ll
llvm/test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll
llvm/test/CodeGen/ARM/Windows/frame-register.ll
llvm/test/CodeGen/ARM/build-attributes.ll
llvm/test/CodeGen/ARM/crash-O0.ll
llvm/test/CodeGen/ARM/crash-greedy-v6.ll
llvm/test/CodeGen/ARM/crash-greedy.ll
llvm/test/CodeGen/ARM/debug-frame-large-stack.ll
llvm/test/CodeGen/ARM/debug-frame-no-debug.ll
llvm/test/CodeGen/ARM/debug-frame-vararg.ll
llvm/test/CodeGen/ARM/debug-frame.ll
llvm/test/CodeGen/ARM/disable-fp-elim.ll
llvm/test/CodeGen/ARM/ehabi-unwind.ll
llvm/test/CodeGen/ARM/ehabi.ll
llvm/test/CodeGen/ARM/fold-stack-adjust.ll
llvm/test/CodeGen/ARM/frame-register.ll
llvm/test/CodeGen/ARM/hello.ll
llvm/test/CodeGen/ARM/inline-asm-clobber.ll
llvm/test/CodeGen/ARM/machine-licm.ll
llvm/test/CodeGen/ARM/macho-frame-offset.ll
llvm/test/CodeGen/ARM/none-macho.ll
llvm/test/CodeGen/ARM/shuffle.ll
llvm/test/CodeGen/ARM/ssp-data-layout.ll
llvm/test/CodeGen/ARM/subreg-remat.ll
llvm/test/CodeGen/MSP430/fp.ll
llvm/test/CodeGen/Mips/Fast-ISel/stackloadstore.ll
llvm/test/CodeGen/NVPTX/f16-instructions.ll
llvm/test/CodeGen/NVPTX/f16x2-instructions.ll
llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll
llvm/test/CodeGen/PowerPC/2010-12-18-PPCStackRefs.ll
llvm/test/CodeGen/PowerPC/Frames-alloca.ll
llvm/test/CodeGen/PowerPC/Frames-large.ll
llvm/test/CodeGen/PowerPC/Frames-leaf.ll
llvm/test/CodeGen/PowerPC/Frames-small.ll
llvm/test/CodeGen/PowerPC/crsave.ll
llvm/test/CodeGen/PowerPC/empty-functions.ll
llvm/test/CodeGen/PowerPC/ppc-prologue.ll
llvm/test/CodeGen/PowerPC/stack-realign.ll
llvm/test/CodeGen/PowerPC/structsinmem.ll
llvm/test/CodeGen/PowerPC/structsinregs.ll
llvm/test/CodeGen/RISCV/calling-conv.ll
llvm/test/CodeGen/RISCV/frame.ll
llvm/test/CodeGen/RISCV/large-stack.ll
llvm/test/CodeGen/RISCV/vararg.ll
llvm/test/CodeGen/SPARC/empty-functions.ll
llvm/test/CodeGen/SystemZ/frame-07.ll
llvm/test/CodeGen/SystemZ/frame-09.ll
llvm/test/CodeGen/SystemZ/frame-13.ll
llvm/test/CodeGen/SystemZ/frame-14.ll
llvm/test/CodeGen/SystemZ/frame-15.ll
llvm/test/CodeGen/SystemZ/frame-16.ll
llvm/test/CodeGen/Thumb/2009-07-27-PEIAssert.ll
llvm/test/CodeGen/Thumb/2009-08-20-ISelBug.ll
llvm/test/CodeGen/Thumb/frame-access.ll
llvm/test/CodeGen/Thumb/frame_thumb.ll
llvm/test/CodeGen/Thumb/push.ll
llvm/test/CodeGen/Thumb2/2009-07-30-PEICrash.ll
llvm/test/CodeGen/Thumb2/2009-08-01-WrongLDRBOpc.ll
llvm/test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll
llvm/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll
llvm/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll
llvm/test/CodeGen/Thumb2/2009-08-21-PostRAKill4.ll
llvm/test/CodeGen/Thumb2/2009-09-01-PostRAProlog.ll
llvm/test/CodeGen/Thumb2/2009-11-01-CopyReg2RegBug.ll
llvm/test/CodeGen/Thumb2/2010-02-24-BigStack.ll
llvm/test/CodeGen/Thumb2/2010-06-19-ITBlockCrash.ll
llvm/test/CodeGen/Thumb2/2011-12-16-T2SizeReduceAssert.ll
llvm/test/CodeGen/Thumb2/2012-01-13-CBNZBug.ll
llvm/test/CodeGen/Thumb2/frameless.ll
llvm/test/CodeGen/Thumb2/frameless2.ll
llvm/test/CodeGen/Thumb2/ldr-str-imm12.ll
llvm/test/CodeGen/Thumb2/machine-licm.ll
llvm/test/CodeGen/X86/2007-04-17-LiveIntervalAssert.ll
llvm/test/CodeGen/X86/2008-03-10-RegAllocInfLoop.ll
llvm/test/CodeGen/X86/2008-03-31-SpillerFoldingBug.ll
llvm/test/CodeGen/X86/2008-04-15-LiveVariableBug.ll
llvm/test/CodeGen/X86/2008-09-29-ReMatBug.ll
llvm/test/CodeGen/X86/2009-04-16-SpillerUnfold.ll
llvm/test/CodeGen/X86/2009-04-29-RegAllocAssert.ll
llvm/test/CodeGen/X86/2009-06-02-RewriterBug.ll
llvm/test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll
llvm/test/CodeGen/X86/2009-10-19-EmergencySpill.ll
llvm/test/CodeGen/X86/2009-10-25-RewriterBug.ll
llvm/test/CodeGen/X86/2009-11-13-VirtRegRewriterBug.ll
llvm/test/CodeGen/X86/2010-01-19-OptExtBug.ll
llvm/test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll
llvm/test/CodeGen/X86/2010-04-29-CoalescerCrash.ll
llvm/test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll
llvm/test/CodeGen/X86/2010-06-09-FastAllocRegisters.ll
llvm/test/CodeGen/X86/2010-06-24-g-constraint-crash.ll
llvm/test/CodeGen/X86/2010-06-25-CoalescerSubRegDefDead.ll
llvm/test/CodeGen/X86/2010-06-25-asm-RA-crash.ll
llvm/test/CodeGen/X86/2011-06-12-FastAllocSpill.ll
llvm/test/CodeGen/X86/2011-07-13-BadFrameIndexDisplacement.ll
llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
llvm/test/CodeGen/X86/addr-of-ret-addr.ll
llvm/test/CodeGen/X86/anyregcc.ll
llvm/test/CodeGen/X86/call-push.ll
llvm/test/CodeGen/X86/coalescer-dce.ll
llvm/test/CodeGen/X86/compact-unwind.ll
llvm/test/CodeGen/X86/crash-O0.ll
llvm/test/CodeGen/X86/empty-functions.ll
llvm/test/CodeGen/X86/fp-elim.ll
llvm/test/CodeGen/X86/hidden-vis-pic.ll
llvm/test/CodeGen/X86/postra-licm.ll
llvm/test/CodeGen/X86/pr1489.ll
llvm/test/CodeGen/X86/pr3154.ll
llvm/test/CodeGen/X86/pr9743.ll
llvm/test/CodeGen/X86/remat-fold-load.ll
llvm/test/CodeGen/X86/ret-addr.ll
llvm/test/CodeGen/X86/sibcall-2.ll
llvm/test/CodeGen/X86/ssp-data-layout.ll
llvm/test/CodeGen/X86/tls-addr-non-leaf-function.ll
llvm/test/CodeGen/XCore/epilogue_prologue.ll
llvm/test/CodeGen/XCore/llvm-intrinsics.ll
llvm/test/DebugInfo/AArch64/frameindices.ll
llvm/test/DebugInfo/AArch64/prologue_end.ll
llvm/test/DebugInfo/ARM/prologue_end.ll
llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll
llvm/test/DebugInfo/Mips/prologue_end.ll
llvm/test/DebugInfo/Sparc/prologue_end.ll
llvm/test/DebugInfo/SystemZ/prologue_end.ll
llvm/test/DebugInfo/SystemZ/variable-loc.ll
llvm/test/DebugInfo/X86/prologue-stack.ll
llvm/test/MC/X86/stackmap-nops.ll