summaryrefslogtreecommitdiff
path: root/gcc/ddg.c
diff options
context:
space:
mode:
authorrevitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-31 10:37:35 +0000
committerrevitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-31 10:37:35 +0000
commit9f995d882defe5bc1c91434e234157685c43cfc2 (patch)
treea85f97f3444494e2d405423a55348c5201edae89 /gcc/ddg.c
parentf959368d12e984ac7841c2d562fc8c057a646637 (diff)
downloadgcc-9f995d882defe5bc1c91434e234157685c43cfc2.tar.gz
Move the creation of anti-dep edge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176972 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ddg.c')
-rw-r--r--gcc/ddg.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/ddg.c b/gcc/ddg.c
index d06bdbb5448..856fa4e6800 100644
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -197,11 +197,6 @@ create_ddg_dep_from_intra_loop_link (ddg_ptr g, ddg_node_ptr src_node,
}
}
- /* If a true dep edge enters the branch create an anti edge in the
- opposite direction to prevent the creation of reg-moves. */
- if ((DEP_TYPE (link) == REG_DEP_TRUE) && JUMP_P (dest_node->insn))
- create_ddg_dep_no_link (g, dest_node, src_node, ANTI_DEP, REG_DEP, 1);
-
latency = dep_cost (link);
e = create_ddg_edge (src_node, dest_node, t, dt, latency, distance);
add_edge_to_ddg (g, e);
@@ -306,8 +301,11 @@ add_cross_iteration_register_deps (ddg_ptr g, df_ref last_def)
gcc_assert (first_def_node);
+ /* Always create the edge if the use node is a branch in
+ order to prevent the creation of reg-moves. */
if (DF_REF_ID (last_def) != DF_REF_ID (first_def)
- || !flag_modulo_sched_allow_regmoves)
+ || !flag_modulo_sched_allow_regmoves
+ || JUMP_P (use_node->insn))
create_ddg_dep_no_link (g, use_node, first_def_node, ANTI_DEP,
REG_DEP, 1);