diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-07-28 19:01:05 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-07-28 19:01:05 +0200 |
commit | 05b5ea3495029f4da3687c03a27d70dad682f585 (patch) | |
tree | 6e2e2c933c124f3e6df48df8ceee73af9f76ee8b /gcc/gcse.c | |
parent | 652c4638a0194d601e968599e27319e1edcd93e2 (diff) | |
download | gcc-05b5ea3495029f4da3687c03a27d70dad682f585.zip gcc-05b5ea3495029f4da3687c03a27d70dad682f585.tar.gz gcc-05b5ea3495029f4da3687c03a27d70dad682f585.tar.bz2 |
re PR debug/45105 (-fcompare-debug failure at -Os)
PR debug/45105
* gcse.c (hoist_code): Use FOR_BB_INSNS macro.
* gcc.dg/pr45105.c: New test.
From-SVN: r162647
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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; |