[AArch64] Remove aarch64_frame_pointer_required
authorWilco Dijkstra <wdijkstr@arm.com>
Wed, 8 Nov 2017 15:34:36 +0000 (15:34 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Wed, 8 Nov 2017 15:34:36 +0000 (15:34 +0000)
commit7040939b9e2cbd084e6dbe015ee6cd2761aacf46
treec7a02a8d9d4ea3d223427b71d56ca73e56370c5a
parent7cc7f3aa68b852b217c511e7d841458b0bdd532a
[AArch64] Remove aarch64_frame_pointer_required

To implement -fomit-leaf-frame-pointer, there are 2 places where we need
to check whether we have to use a frame chain (since register allocation
may allocate LR in a leaf function that omits the frame pointer, but if
LR is spilled we must emit a frame chain).  To simplify this do not force
frame_pointer_needed via aarch64_frame_pointer_required, but enable the
frame chain in aarch64_layout_frame.  Now aarch64_frame_pointer_required
can be removed and aarch64_can_eliminate is simplified.

    gcc/
* config/aarch64/aarch64.c (aarch64_frame_pointer_required)
Remove.
(aarch64_layout_frame): Initialise emit_frame_chain.
(aarch64_can_eliminate): Remove omit leaf frame pointer code.
(TARGET_FRAME_POINTER_REQUIRED): Remove define.

    testsuite/
* gcc.target/aarch64/dwarf-cfa-reg.c: Update.

From-SVN: r254533
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/dwarf-cfa-reg.c