This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR rtl-optimization/64905: Clear hard frame pointer alignment if not needed
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, gcc-patches at gcc dot gnu dot org, Jeff Law <law at redhat dot com>
- Date: Wed, 04 Feb 2015 14:20:08 -0500
- Subject: Re: [PATCH] PR rtl-optimization/64905: Clear hard frame pointer alignment if not needed
- Authentication-results: sourceware.org; auth=none
- References: <20150204161650 dot GA26675 at intel dot com>
On 2015-02-04 11:16 AM, H.J. Lu wrote:
When hard frame pointer isn't needed, the register for hard frame pointer
may be reused. This patch clears alignment on hard frame pointer if hard
frame pointer isn't needed. OK for trunk after bootstrap and test on
Linux/x86-64?
LRA can set up frame_pointer_needed in some complicated cases (in
lra-eliminations.c::setup_can_eliminate). So I'd reset
REGNO_POINTER_ALIGN in setup_can_eleminate for any case even although
without the change the patch is safe.
So, H.J., if you add resetting REGNO_POINTER_ALIGN in
setup_can_eliminate, the patch is automatically approved.
Thanks.
H.J.
--
gcc/
PR rtl-optimization/64905
* ira.c (ira_setup_eliminable_regset): Clear hard frame pointer
alignment if it isn't needed.
gcc/testsuite/
PR rtl-optimization/64905
* gcc.target/i386/pr64905.c: New file.
---
gcc/ira.c | 2 ++
gcc/testsuite/gcc.target/i386/pr64905.c | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/i386/pr64905.c