From e5f95b665b90a697cc97a5378f761557f728d9a0 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 31 Aug 2015 13:45:48 +0000 Subject: [PATCH] cfganal.c (pre_and_rev_post_order_compute_fn): Correctly enter entry and exit blocks for reverse post order. * cfganal.c (pre_and_rev_post_order_compute_fn): Correctly enter entry and exit blocks for reverse post order. From-SVN: r227341 --- gcc/ChangeLog | 5 +++++ gcc/cfganal.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index deda8a42906..7d48608e3e4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-08-31 Michael Matz + + * cfganal.c (pre_and_rev_post_order_compute_fn): Correctly + enter entry and exit blocks for reverse post order. + 2015-08-31 Richard Biener * lto-streamer.h (lto_location_cache::cached_location::sysp): Add. diff --git a/gcc/cfganal.c b/gcc/cfganal.c index 7676bd8d6cc..3a9174c60bb 100644 --- a/gcc/cfganal.c +++ b/gcc/cfganal.c @@ -925,7 +925,7 @@ pre_and_rev_post_order_compute_fn (struct function *fn, pre_order[pre_order_num] = ENTRY_BLOCK; pre_order_num++; if (rev_post_order) - rev_post_order[rev_post_order_num--] = ENTRY_BLOCK; + rev_post_order[rev_post_order_num--] = EXIT_BLOCK; } else rev_post_order_num -= NUM_FIXED_BLOCKS; @@ -996,7 +996,7 @@ pre_and_rev_post_order_compute_fn (struct function *fn, pre_order[pre_order_num] = EXIT_BLOCK; pre_order_num++; if (rev_post_order) - rev_post_order[rev_post_order_num--] = EXIT_BLOCK; + rev_post_order[rev_post_order_num--] = ENTRY_BLOCK; } return pre_order_num; -- 2.30.2