aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-07-28 17:01:05 +0000
committerJakub Jelinek <jakub@redhat.com>2010-07-28 17:01:05 +0000
commitba474f2b8753a6be1625bd6b87c7f69cc154926f (patch)
tree6e2e2c933c124f3e6df48df8ceee73af9f76ee8b /gcc/gcse.c
parent42d02f76f6f04ab53f8d9ada3c5482d731e5d0b2 (diff)
PR debug/45105
* gcse.c (hoist_code): Use FOR_BB_INSNS macro. * gcc.dg/pr45105.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@162647 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 6e923f9d572..15809aa0526 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -4390,21 +4390,15 @@ hoist_code (void)
FOR_EACH_BB (bb)
{
rtx insn;
- rtx bb_end;
int to_head;
- insn = BB_HEAD (bb);
- bb_end = BB_END (bb);
to_head = 0;
-
- while (insn != bb_end)
+ FOR_BB_INSNS (bb, insn)
{
/* Don't count debug instructions to avoid them affecting
decision choices. */
if (NONDEBUG_INSN_P (insn))
to_bb_head[INSN_UID (insn)] = to_head++;
-
- insn = NEXT_INSN (insn);
}
bb_size[bb->index] = to_head;