This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r251140 - in /trunk/gcc: ChangeLog config/rs600...
- From: amodra at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Thu, 17 Aug 2017 02:03:04 -0000
- Subject: r251140 - in /trunk/gcc: ChangeLog config/rs600...
Author: amodra
Date: Thu Aug 17 02:03:03 2017
New Revision: 251140
URL: https://gcc.gnu.org/viewcvs?rev=251140&root=gcc&view=rev
Log:
[RS6000] PR 80938, Don't emit frame info for regs that don't need saving
It is possible when using out-of-line register saves or store multiple
to save some registers unnecessarily, for example one reg in the block
saved might be unused. We don't need to emit frame info for those
registers as that just bloats the info, and also can result in an ICE
when shrink-wrap gives multiple paths through the function saving
different sets of registers. Join points need to have identical frame
register save state regardless of the path taken.
This patch reverts the previous fix for PR80939 "Use SAVE_MULTIPLE
only if we restore what it saves (PR80938)" and instead fixes the PR
by correcting the frame info. The change to rs6000_savres_strategy
is an optimization, but note that it hides the underlying problem in
the PR testcase.
PR target/80938
* config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
Don't use store multiple if only one reg needs saving.
(interesting_frame_related_regno): New function.
(rs6000_frame_related): Don't emit frame info for regs that
don't need saving.
(rs6000_emit_epilogue): Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.c