Patchwork don't force debug insns after their PREV_INSNs

login
register
mail settings
Submitter Alexandre Oliva
Date June 3, 2011, 2:47 p.m.
Message ID <ortyc7km50.fsf@livre.localdomain>
Download mbox | patch
Permalink /patch/98593/
State New
Headers show

Comments

Alexandre Oliva - June 3, 2011, 2:47 p.m.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=677681 can be
“fixed” by disabling the artificial dependency of a debug insn on its
previous insn.

Debug insns will often depend on their prevs anyway, in a use/def
relationship, but if the def was (re)moved or the use was reset, this
artificial dep helped keep the debug insn “in place”.

Being a very imperfect heuristic, it's not clear that it helps more than
it harms.  Thoughts?  Regstrapped on x86_64-linux-gnu and
i686-linux-gnu.
Bernd Schmidt - June 3, 2011, 6:27 p.m.
On 06/03/2011 04:47 PM, Alexandre Oliva wrote:
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=677681 can be
> “fixed” by disabling the artificial dependency of a debug insn on its
> previous insn.
> 
> Debug insns will often depend on their prevs anyway, in a use/def
> relationship, but if the def was (re)moved or the use was reset, this
> artificial dep helped keep the debug insn “in place”.
> 
> Being a very imperfect heuristic, it's not clear that it helps more than
> it harms.  Thoughts?  Regstrapped on x86_64-linux-gnu and
> i686-linux-gnu.

Can you explain a little more clearly what the problem is? The RH
bugzilla isn't really clear.


Bernd

Patch

for  gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* sched-deps.c (sched_analyze_insn): Don't force debug insns
	to follow their original predecessors.

Index: gcc/sched-deps.c
===================================================================
--- gcc/sched-deps.c.orig	2011-02-24 09:54:12.016654388 -0300
+++ gcc/sched-deps.c	2011-02-24 09:55:48.456918435 -0300
@@ -2816,7 +2816,7 @@  sched_analyze_insn (struct deps_desc *de
 	 additional analysis can modify the generated code.  */
       prev = PREV_INSN (insn);
-
-      if (prev && NONDEBUG_INSN_P (prev))
-	add_dependence (insn, prev, REG_DEP_ANTI);
     }
   else