summaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-28 17:01:05 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-28 17:01:05 +0000
commit2241e3a7d3449adac706d7a186ea72dc44bffd21 (patch)
tree6e2e2c933c124f3e6df48df8ceee73af9f76ee8b /gcc/gcse.c
parentbb78b9eefd523013e1a29bbf5de4afac6390f8d4 (diff)
downloadgcc-2241e3a7d3449adac706d7a186ea72dc44bffd21.tar.gz
PR debug/45105
* gcse.c (hoist_code): Use FOR_BB_INSNS macro. * gcc.dg/pr45105.c: New test. git-svn-id: svn+ssh://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;