summaryrefslogtreecommitdiff
path: root/gcc/ddg.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-12-07 23:37:21 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-12-07 23:37:21 +0100
commitaec4e50c21eced5ee903b7350b71170fa58262e4 (patch)
tree853a74782258e6b15090a44af48211e0ea2c2900 /gcc/ddg.c
parent8ad9d49ec9946a8ab98404ed6c07ae48e9d345ab (diff)
downloadgcc-aec4e50c21eced5ee903b7350b71170fa58262e4.tar.gz
re PR debug/42244 (var-tracking ICE for 300.twolf)
PR debug/42244 * ddg.c (add_inter_loop_mem_dep): Use ANTI_DEP if from or to is a DEBUG_INSN. * gcc.dg/debug/pr42244.c: New test. From-SVN: r155062
Diffstat (limited to 'gcc/ddg.c')
-rw-r--r--gcc/ddg.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ddg.c b/gcc/ddg.c
index 23fa6fa2aeb..f51c5dc4e29 100644
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -359,9 +359,13 @@ add_inter_loop_mem_dep (ddg_ptr g, ddg_node_ptr from, ddg_node_ptr to)
if (mem_write_insn_p (from->insn))
{
if (mem_read_insn_p (to->insn))
- create_ddg_dep_no_link (g, from, to, TRUE_DEP, MEM_DEP, 1);
+ create_ddg_dep_no_link (g, from, to,
+ DEBUG_INSN_P (to->insn)
+ ? ANTI_DEP : TRUE_DEP, MEM_DEP, 1);
else if (from->cuid != to->cuid)
- create_ddg_dep_no_link (g, from, to, OUTPUT_DEP, MEM_DEP, 1);
+ create_ddg_dep_no_link (g, from, to,
+ DEBUG_INSN_P (to->insn)
+ ? ANTI_DEP : OUTPUT_DEP, MEM_DEP, 1);
}
else
{
@@ -369,8 +373,11 @@ add_inter_loop_mem_dep (ddg_ptr g, ddg_node_ptr from, ddg_node_ptr to)
return;
else if (from->cuid != to->cuid)
{
- create_ddg_dep_no_link (g, from, to, ANTI_DEP, MEM_DEP, 1);
- create_ddg_dep_no_link (g, to, from, TRUE_DEP, MEM_DEP, 1);
+ create_ddg_dep_no_link (g, from, to, ANTI_DEP, MEM_DEP, 1);
+ if (DEBUG_INSN_P (from->insn) || DEBUG_INSN_P (to->insn))
+ create_ddg_dep_no_link (g, to, from, ANTI_DEP, MEM_DEP, 1);
+ else
+ create_ddg_dep_no_link (g, to, from, TRUE_DEP, MEM_DEP, 1);
}
}