From 2241e3a7d3449adac706d7a186ea72dc44bffd21 Mon Sep 17 00:00:00 2001 From: jakub Date: Wed, 28 Jul 2010 17:01:05 +0000 Subject: 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 --- gcc/gcse.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'gcc/gcse.c') 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; -- cgit v1.2.1