On Jun 14, 2012, Ayal Zaks <ayal.z...@gmail.com> wrote: > Thanks for the duplicate ping. This is fine.
> So this indeed solves the discrepancy between running SMS w/ and w/o > debugging? I can't tell whether it solves it completely, but it's surely a step in the right direction. > Please include a comment next to the code stating why it's important > not to create such deps. Done > You may also want to store the result of "DEP_PRO (dep)" in > src_<something> and use it twice, for clarity. Done Here's what I'm about to check in. Thanks,
for gcc/ChangeLog from Alexandre Oliva <aol...@redhat.com> * ddg.c (build_intra_loop_deps): Discard deps of nondebug on debug. Index: gcc/ddg.c =================================================================== --- gcc/ddg.c.orig 2012-06-21 21:45:00.305313798 -0300 +++ gcc/ddg.c 2012-06-21 21:51:58.000000000 -0300 @@ -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;
-- Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFLA.org/ FSF Latin America board member Free Software Evangelist Red Hat Brazil Compiler Engineer