+
+/* The following function adds forward dependence (FROM, TO) with
+ given DEP_TYPE. The forward dependence should be not exist before. */
+
+void
+add_forward_dependence (rtx from, rtx to, enum reg_note dep_type)
+{
+ rtx new_link;
+
+#ifdef ENABLE_CHECKING
+ /* If add_dependence is working properly there should never
+ be notes, deleted insns or duplicates in the backward
+ links. Thus we need not check for them here.
+
+ However, if we have enabled checking we might as well go
+ ahead and verify that add_dependence worked properly. */
+ gcc_assert (!NOTE_P (from));
+ gcc_assert (!INSN_DELETED_P (from));
+ if (forward_dependency_cache)
+ gcc_assert (!bitmap_bit_p (&forward_dependency_cache[INSN_LUID (from)],
+ INSN_LUID (to)));
+ else
+ gcc_assert (!find_insn_list (to, INSN_DEPEND (from)));
+
+ /* ??? If bitmap_bit_p is a predicate, what is this supposed to do? */
+ if (forward_dependency_cache != NULL)
+ bitmap_bit_p (&forward_dependency_cache[INSN_LUID (from)],
+ INSN_LUID (to));
+#endif
+
+ new_link = alloc_INSN_LIST (to, INSN_DEPEND (from));
+
+ PUT_REG_NOTE_KIND (new_link, dep_type);
+
+ INSN_DEPEND (from) = new_link;
+ INSN_DEP_COUNT (to) += 1;
+}
+