This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: debug insns in SMS
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Ayal Zaks <ayal dot zaks at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Jun 2012 21:56:44 -0300
- Subject: Re: debug insns in SMS
- References: <OFFA1E9979.E0BBC3C3-ONC2257884.004228E1-C2257884.0048FF4A@il.ibm.com> <ormxj5m9yy.fsf@livre.localdomain> <OF77DA4497.F3AFFC59-ONC2257885.002FEAEA-C2257885.003268D3@il.ibm.com> <orsjsvklu4.fsf_-_@livre.localdomain> <OFBA917CB2.6A42DB2C-ONC2257886.003021E3-C2257886.00344C5F@il.ibm.com> <or7gxpe6qt.fsf@livre.localdomain> <orfw9y50ue.fsf@livre.localdomain> <CAHTt4KtOyr8bzxgZDLyZowFbRbEDe19EmjgJQNmij6HcrmbmZQ@mail.gmail.com>
On Jun 14, 2012, Ayal Zaks <ayal.zaks@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 <aoliva@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