diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-02 00:58:27 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-02 00:58:27 +0000 |
commit | 05bcc2d9f3c307c250fbd2626071f2a1ad29a0b7 (patch) | |
tree | c12363c0e9a70d4af1ff930ffa68b983b514f4e9 /gcc/gcse.c | |
parent | 3ccc312519272de89b6840d727485a31206dadd7 (diff) | |
download | gcc-05bcc2d9f3c307c250fbd2626071f2a1ad29a0b7.tar.gz |
* loop.c (add_label_notes): Increment the label usage count when
a note is added to an insn which refers to a CODE_LABEL.
* gcse.c (add_label_notes): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38603 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c index 73f49f3ce88..f423c5ec27d 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -1,6 +1,6 @@ /* Global common subexpression elimination/Partial redundancy elimination and global constant/copy propagation for GNU compiler. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. @@ -4839,8 +4839,9 @@ one_pre_gcse_pass (pass) } /* If X contains any LABEL_REF's, add REG_LABEL notes for them to INSN. - We have to add REG_LABEL notes, because the following loop optimization - pass requires them. */ + If notes are added to an insn which references a CODE_LABEL, the + LABEL_NUSES count is incremented. We have to add REG_LABEL notes, + because the following loop optimization pass requires them. */ /* ??? This is very similar to the loop.c add_label_notes function. We could probably share code here. */ @@ -4868,6 +4869,8 @@ add_label_notes (x, insn) REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_LABEL, XEXP (x, 0), REG_NOTES (insn)); + if (LABEL_P (XEXP (x, 0))) + LABEL_NUSES (XEXP (x, 0))++; return; } |