aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2014-04-16 23:31:30 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2014-04-16 23:31:30 +0000
commit82b9c0158be32542295d88f64d1076f501ad4fff (patch)
treef716b175fe81f560a5b2e542361bf644c423f907 /gcc
parentd2dfaca3b8bac6b00c0e8fddcc70d017c36e46f0 (diff)
downloadgcc-82b9c0158be32542295d88f64d1076f501ad4fff.zip
gcc-82b9c0158be32542295d88f64d1076f501ad4fff.tar.gz
gcc-82b9c0158be32542295d88f64d1076f501ad4fff.tar.bz2
final.c (compute_alignments): Do not apply loop alignment to a block falling through to the exit.
* final.c (compute_alignments): Do not apply loop alignment to a block falling through to the exit. From-SVN: r209451
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/final.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fe2d1ed..7865b8a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ * final.c (compute_alignments): Do not apply loop alignment to a block
+ falling through to the exit.
+
2014-04-16 Catherine Moore <clm@codesourcery.com>
* mips.md (*mov<mode>_internal, *movhi_internal, *movqi_internal):
diff --git a/gcc/final.c b/gcc/final.c
index 83abee2..b4b96b9 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -775,6 +775,8 @@ compute_alignments (void)
/* In case block is frequent and reached mostly by non-fallthru edge,
align it. It is most likely a first block of loop. */
if (has_fallthru
+ && !(single_succ_p (bb)
+ && single_succ (bb) == EXIT_BLOCK_PTR_FOR_FN (cfun))
&& optimize_bb_for_speed_p (bb)
&& branch_frequency + fallthru_frequency > freq_threshold
&& (branch_frequency