aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-04-14 10:46:57 -0700
committerJim Wilson <wilson@gcc.gnu.org>1992-04-14 10:46:57 -0700
commita3ee589982d1fd8b65e0adcf440f374159d86de8 (patch)
tree1dd3553444dcdf00926189b16c77a3f99f79c394 /gcc/rtl.c
parentf24ec84c7b8cb5bb59e7b0e7e73b2c8107fb6b5c (diff)
downloadgcc-a3ee589982d1fd8b65e0adcf440f374159d86de8.zip
gcc-a3ee589982d1fd8b65e0adcf440f374159d86de8.tar.gz
gcc-a3ee589982d1fd8b65e0adcf440f374159d86de8.tar.bz2
*** empty log message ***
From-SVN: r742
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r--gcc/rtl.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c
index b82e5f1..dee6152 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -383,21 +383,39 @@ add_dependence (insn, elem, dep_type)
rtx elem;
enum reg_note dep_type;
{
- rtx link;
+ rtx link, next;
/* Don't depend an insn on itself. */
if (insn == elem)
return;
/* If elem is part of a sequence that must be scheduled together, then
- make the dependence point to the last insn of the sequence. */
- if (NEXT_INSN (elem) && SCHED_GROUP_P (NEXT_INSN (elem)))
+ make the dependence point to the last insn of the sequence.
+ When HAVE_cc0, it is possible for NOTEs to exist between users and
+ setters of the condition codes, so we must skip past notes here.
+ Otherwise, NOTEs are impossible here. */
+
+ next = NEXT_INSN (elem);
+
+#ifdef HAVE_cc0
+ while (next && GET_CODE (next) == NOTE)
+ next = NEXT_INSN (next);
+#endif
+
+ if (next && SCHED_GROUP_P (next))
{
- while (NEXT_INSN (elem) && SCHED_GROUP_P (NEXT_INSN (elem)))
- elem = NEXT_INSN (elem);
- /* Again, don't depend an insn of itself. */
- if (insn == elem)
+ /* Notes will never intervene here though, so don't bother checking
+ for them. */
+ while (next && SCHED_GROUP_P (next))
+ next = NEXT_INSN (next);
+
+ /* Again, don't depend an insn on itself. */
+ if (insn == next)
return;
+
+ /* Make the dependence to NEXT, the last insn of the group, instead
+ of the original ELEM. */
+ elem = next;
}
/* Check that we don't already have this dependence. */