summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-04 10:10:29 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-04 10:10:29 +0000
commit9ea83aa5a7bb715c9d6a243cd09f84b95ab15056 (patch)
tree5f983c4b095bb851169f7e8ad2f512f5f73641cb
parent262cead125f26e0e2c02d8fe136a8af756726001 (diff)
downloadppe42-gcc-9ea83aa5a7bb715c9d6a243cd09f84b95ab15056.tar.gz
ppe42-gcc-9ea83aa5a7bb715c9d6a243cd09f84b95ab15056.zip
* predict.c (propagate_freq): Make bitno unsigned. Move
npredecessors update out of loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90056 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/predict.c22
2 files changed, 14 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9c60546dfe7..7e1c1a1c2da 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2004-11-04 Nathan Sidwell <nathan@codesourcery.com>
+ * predict.c (propagate_freq): Make bitno unsigned. Move
+ npredecessors update out of loop.
+
* bitmap.h (bitmap_iterator): Remove word_bit and bit
fields. Rename others.
(bmp_iter_common_next_1, bmp_iter_single_next_1,
diff --git a/gcc/predict.c b/gcc/predict.c
index 9500b2b2730..7be6b90fc3b 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -1557,7 +1557,7 @@ propagate_freq (struct loop *loop, bitmap tovisit)
basic_block head = loop->header;
basic_block bb;
basic_block last;
- int i;
+ unsigned i;
edge e;
basic_block nextbb;
bitmap_iterator bi;
@@ -1569,15 +1569,15 @@ propagate_freq (struct loop *loop, bitmap tovisit)
edge_iterator ei;
int count = 0;
- /* The outermost "loop" includes the exit block, which we can not
- look up via BASIC_BLOCK. Detect this and use EXIT_BLOCK_PTR
- directly. Do the same for the entry block just to be safe. */
- if (i == ENTRY_BLOCK)
- bb = ENTRY_BLOCK_PTR;
- else if (i == EXIT_BLOCK)
- bb = EXIT_BLOCK_PTR;
- else
- bb = BASIC_BLOCK (i);
+ /* The outermost "loop" includes the exit block, which we can not
+ look up via BASIC_BLOCK. Detect this and use EXIT_BLOCK_PTR
+ directly. Do the same for the entry block. */
+ if (i == (unsigned)ENTRY_BLOCK)
+ bb = ENTRY_BLOCK_PTR;
+ else if (i == (unsigned)EXIT_BLOCK)
+ bb = EXIT_BLOCK_PTR;
+ else
+ bb = BASIC_BLOCK (i);
FOR_EACH_EDGE (e, ei, bb->preds)
{
@@ -1589,8 +1589,8 @@ propagate_freq (struct loop *loop, bitmap tovisit)
fprintf (dump_file,
"Irreducible region hit, ignoring edge to %i->%i\n",
e->src->index, bb->index);
- BLOCK_INFO (bb)->npredecessors = count;
}
+ BLOCK_INFO (bb)->npredecessors = count;
}
memcpy (&BLOCK_INFO (head)->frequency, &real_one, sizeof (real_one));
OpenPOWER on IntegriCloud