summaryrefslogtreecommitdiff
path: root/gcc/ddg.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2012-06-22 01:30:00 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2012-06-22 01:30:00 +0000
commit1ca63357cb07ce7c61ad275d8f870187d8dd8950 (patch)
treefbacc3c93f3473deb29e7d43ab8eaf363f3c0221 /gcc/ddg.c
parentce8fe26dc09eaeacbbcb867c3b8544f765134da0 (diff)
downloadgcc-1ca63357cb07ce7c61ad275d8f870187d8dd8950.tar.gz
* ddg.c (build_intra_loop_deps): Discard deps of nondebug on debug.
From-SVN: r188867
Diffstat (limited to 'gcc/ddg.c')
-rw-r--r--gcc/ddg.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ddg.c b/gcc/ddg.c
index 853f5ea9184..a7d3e665a85 100644
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -531,7 +531,15 @@ build_intra_loop_deps (ddg_ptr g)
FOR_EACH_DEP (dest_node->insn, SD_LIST_BACK, sd_it, dep)
{
- ddg_node_ptr src_node = get_node_of_insn (g, DEP_PRO (dep));
+ rtx src_insn = DEP_PRO (dep);
+ ddg_node_ptr src_node;
+
+ /* Don't add dependencies on debug insns to non-debug insns
+ to avoid codegen differences between -g and -g0. */
+ if (DEBUG_INSN_P (src_insn) && !DEBUG_INSN_P (dest_node->insn))
+ continue;
+
+ src_node = get_node_of_insn (g, src_insn);
if (!src_node)
continue;