diff options
author | Jan Hubicka <jh@suse.cz> | 2001-07-26 00:23:09 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-07-25 22:23:09 +0000 |
commit | c4f81e4a6b4a1ff4774c8836de4a7241c57b278f (patch) | |
tree | bdf6f2181d743e47072722caa34cbf4c83b53189 /gcc/predict.c | |
parent | 472385a25f9771ac1171369f7b38d6e8845cc8cf (diff) | |
download | gcc-c4f81e4a6b4a1ff4774c8836de4a7241c57b278f.zip gcc-c4f81e4a6b4a1ff4774c8836de4a7241c57b278f.tar.gz gcc-c4f81e4a6b4a1ff4774c8836de4a7241c57b278f.tar.bz2 |
predict.c (estimate_probability): Avoid duplicated predictions.
* predict.c (estimate_probability): Avoid duplicated predictions.
* loop.c (find_and_verify_loops): Grok multiple barriers.
From-SVN: r44369
Diffstat (limited to 'gcc/predict.c')
-rw-r--r-- | gcc/predict.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index 9fed0c9..de1a141 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -255,6 +255,7 @@ estimate_probability (loops_info) { sbitmap *dominators, *post_dominators; int i; + int found_noreturn = 0; dominators = sbitmap_vector_alloc (n_basic_blocks, n_basic_blocks); post_dominators = sbitmap_vector_alloc (n_basic_blocks, n_basic_blocks); @@ -309,9 +310,15 @@ estimate_probability (loops_info) /* If block has no sucessor, predict all possible paths to it as improbable, as the block contains a call to a noreturn function and thus can be executed only once. */ - if (bb->succ == NULL) + if (bb->succ == NULL && !found_noreturn) { int y; + + /* ??? Postdominator claims each noreturn block to be postdominated + by each, so we need to run only once. This needs to be changed + once postdominace algorithm is updated to say something more sane. + */ + found_noreturn = 1; for (y = 0; y < n_basic_blocks; y++) if (!TEST_BIT (post_dominators[y], i)) { |