diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2015-12-11 01:27:14 +0100 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2015-12-11 01:27:14 +0100 |
commit | 5d59ed6332df25f0ae59660dc127a4106bc1b7db (patch) | |
tree | dc15978b0076a05b78a6f5c3f29688925bde398f /gcc/tree.c | |
parent | 9c7163d0bf0ec96fa52df323b35a625d73baa8b3 (diff) | |
download | gcc-5d59ed6332df25f0ae59660dc127a4106bc1b7db.zip gcc-5d59ed6332df25f0ae59660dc127a4106bc1b7db.tar.gz gcc-5d59ed6332df25f0ae59660dc127a4106bc1b7db.tar.bz2 |
Fix shrink-wrapping bug (PR67778, PR68634)
After shrink-wrapping has found the "tightest fit" for where to place
the prologue, it tries move it earlier (so that frame saves are run
earlier) -- but without copying any more basic blocks.
Unfortunately a candidate block we select can be inside a loop, and we
will still allow it (because the loop always exits via our previously
chosen block). We can do that just fine if we make a duplicate of the
block, but we do not want to here.
So we need to detect this situation. We can place the prologue at a
previous block PRE only if PRE dominates every block reachable from
it, because then we will never need to duplicate that block (it will
always be executed with prologue).
2015-12-11 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/67778
PR rtl-optimization/68634
* shrink-wrap.c (try_shrink_wrapping): Add a comment about why we want
to put the prologue earlier. When determining if an earlier block is
suitable, make sure it dominates every block reachable from it.
From-SVN: r231552
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions