summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/frame-pointer-elim.c
Commit message (Collapse)AuthorAgeFilesLines
* [Driver] Default to -momit-leaf-frame-pointer for AArch64Fangrui Song2019-12-131-1/+3
| | | | | | | | | | | | | | | | | This matches https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html > -momit-leaf-frame-pointer > -mno-omit-leaf-frame-pointer > > Omit or keep the frame pointer in leaf functions. The former behavior is the default. -mno-omit-leaf-frame-pointer is currently a no-op because TargetOptions::DisableFramePointerElim is only considered for non-leaf functions. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D71167
* clang: Don't warn on unused momit-leaf-frame-pointer when frame pointers are ↵Nico Weber2019-08-131-0/+10
| | | | | | | | | | | | | | | | | | | | off. This fixes a regression from r365860: As that commit message states, there are 3 valid states targeted by the combination of -f(no-)omit-frame-pointer and -m(no-)omit-leaf-frame-pointer. After r365860 it's impossible to get from state 10 (omit just leaf frame pointers) to state 11 (omit all frame pointers) in a single command line without getting a warning. This change restores that functionality. Fixes PR42966. Differential Revision: https://reviews.llvm.org/D66142 llvm-svn: 368728
* [Clang] Replace cc1 options '-mdisable-fp-elim' and '-momit-leaf-frame-pointer'Yuanfang Chen2019-07-201-14/+6
| | | | | | | | | | | | | | | | with '-mframe-pointer' After D56351 and D64294, frame pointer handling is migrated to tri-state (all, non-leaf, none) in clang driver and on the function attribute. This patch makes the frame pointer handling cc1 option tri-state. Reviewers: chandlerc, rnk, t.p.northover, MaskRay Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D56353 llvm-svn: 366645
* [PowerPC] Default to -fomit-frame-pointer when optimization is enabledFangrui Song2019-07-121-0/+5
| | | | | | | NetBSD, Linux, CloudABI and Hurd already omit frame pointer for PowerPC. Make it do so for other platforms. llvm-svn: 365862
* [Driver] Refactor interaction between -f(no-)?omit-frame-pointer and ↵Fangrui Song2019-07-121-27/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -m(no-)?omit-leaf-frame-pointer Use a tri-state enum to represent shouldUseFramePointer() and shouldUseLeafFramePointer(). This simplifies the logic and fixes PR9825: -fno-omit-frame-pointer doesn't imply -mno-omit-leaf-frame-pointer. and PR24003: /Oy- /O2 should not omit leaf frame pointer: this matches MSVC x86-32. (/Oy- is a no-op on MSVC x86-64.) and: when CC1 option -mdisable-fp-elim if absent, -momit-leaf-frame-pointer can also be omitted. The new behavior matches GCC: -fomit-frame-pointer wins over -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer loses out to -momit-leaf-frame-pointer The behavior makes lots of sense. We have 4 states: - 00) leaf retained, non-leaf retained - 01) leaf retained, non-leaf omitted (this is invalid) - 10) leaf omitted, non-leaf retained (what -momit-leaf-frame-pointer was designed for) - 11) leaf omitted, non-leaf omitted "omit" options taking precedence over "no-omit" options is the only way to make 3 valid states representable with -f(no-)?omit-frame-pointer and -m(no-)?omit-leaf-pointer. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D64294 llvm-svn: 365860
* Revert enabling frame pointer elimination on OpenBSD for now.Brad Smith2019-06-281-13/+0
| | | | llvm-svn: 364679
* Enable frame pointer elimination for OpenBSD on powerpc.Brad Smith2019-04-191-0/+4
| | | | llvm-svn: 358775
* Enable frame pointer elimination for OpenBSD on x86 and mips64.Brad Smith2019-04-121-0/+9
| | | | llvm-svn: 358245
* For NetBSD, unwind data is emitted by default, so also enable frameJoerg Sonnenberger2018-07-171-0/+9
| | | | | | pointer optimisation by default when using optimisation. llvm-svn: 337274
* ARM-Darwin: re-enable -momit-leaf-frame-pointer.Tim Northover2017-01-271-2/+2
| | | | | | | | | | | | In r279546 I disabled all frame pointer elimination at the front-end on ARM-Darwin (and warned about it) because before that the backend had been silently ignoring these options. It turns out we didn't ignore -momit-leaf-frame-pointer though, just the more general -fomit-frame-pointer. So this re-enables passing that down to CodeGen so that everything really does continue working as before (with better diagnostics). llvm-svn: 293311
* Adding an additional test to ensure the frame pointer is emittedDouglas Yung2016-08-241-0/+2
| | | | | | when compiling with optimization when PS4 is the target. llvm-svn: 279603
* ARM-Darwin: ignore and diagnose attempts to omit frame pointer.Tim Northover2016-08-231-0/+18
| | | | | | | | | | iOS (and other 32-bit ARM variants) always require a valid frame pointer to improve backtraces. Previously the -fomit-frame-pointer and -momit-leaf-frame-pointer options were being silently discarded via hacks in the backend. It's better if Clang configures itself to emit the correct IR and warns about (ignored) attempts to override this. llvm-svn: 279546
* Pass in frame pointer omitting compiler flags for CloudABI as well.Ed Schouten2016-08-111-0/+9
| | | | | | | | | On Linux we pass in -fomit-frame-pointer flags (and similar) automatically if optimization is enabled. Let's do the same thing on CloudABI. Without this, Clang seems to run out of registers quite quickly while trying to build code with inline assembly. llvm-svn: 278393
* Fix a typoFilipe Cabecinhas2015-01-311-1/+1
| | | | | | We're not that much into metals. llvm-svn: 227696
* Shuffle tests around to more appropriate filesFilipe Cabecinhas2015-01-301-0/+5
| | | | llvm-svn: 227592
* Move this file into the correct directory.Eric Christopher2013-04-031-0/+30
llvm-svn: 178607
OpenPOWER on IntegriCloud