* [PR debug/46576] don't reset prev_nonjump_insn at debug insns
@ 2010-12-08 6:35 Alexandre Oliva
2010-12-08 10:56 ` Richard Guenther
2010-12-15 11:06 ` Dave Korn
0 siblings, 2 replies; 5+ messages in thread
From: Alexandre Oliva @ 2010-12-08 6:35 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
mark_all_labels() retains information from the prior insn to attempt to
fill in the JUMP_LABEL of a computed jump. If there happens to be a
debug insn between them, we won't fill in the JUMP_LABEL, and
-fcompare-debug fails. Presumably in larger testcases this may also
lead to codegen differences.
This patch skips debug insns while scanning basic blocks, so that we
don't reset prev_nonjump_insn and don't otherwise waste time at them.
Regstrapped on x86_64-linux-gnu. Ok to install?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vta-jump-labels-pr46576.patch --]
[-- Type: text/x-diff, Size: 2012 bytes --]
for gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
PR debug/46576
* jump.c (mark_all_labels): Skip debug insns.
for gcc/testsuite/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
PR debug/46576
* gfortran.dg/debug/pr46576.f: New.
Index: gcc/jump.c
===================================================================
--- gcc/jump.c.orig 2010-12-06 13:00:19.389495577 -0200
+++ gcc/jump.c 2010-12-06 13:01:29.801552684 -0200
@@ -193,7 +193,7 @@ mark_all_labels (rtx f)
rtx prev_nonjump_insn = NULL;
for (insn = f; insn; insn = NEXT_INSN (insn))
- if (INSN_P (insn))
+ if (NONDEBUG_INSN_P (insn))
{
mark_jump_label (PATTERN (insn), insn, 0);
Index: gcc/testsuite/gfortran.dg/debug/pr46576.f
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/testsuite/gfortran.dg/debug/pr46576.f 2010-12-07 14:04:17.522493939 -0200
@@ -0,0 +1,29 @@
+C PR debug/46576, reduced from ../20010519-1.f
+C { dg-do compile }
+C { dg-options "-O -fcompare-debug" }
+ LOGICAL QDISK,QDW,QCMPCT
+ LOGICAL LNOMA,LRAISE,LSCI,LBIG
+ ASSIGN 801 TO I800 ! { dg-warning "Deleted feature: ASSIGN" "Deleted feature: ASSIGN" }
+ GOTO 800
+ 801 CONTINUE
+ ASSIGN 761 TO I760 ! { dg-warning "Deleted feature: ASSIGN" "Deleted feature: ASSIGN" }
+ 761 CONTINUE
+ IF(LSCI) THEN
+ DO I=1,LENCM
+ ENDDO
+ ENDIF
+ DO WHILE((CVGMX.GT.TOLDIM).AND.(ITER.LT.ITMX))
+ IF(.NOT.QDW) THEN
+ ASSIGN 641 to I640 ! { dg-warning "Deleted feature: ASSIGN" "Deleted feature: ASSIGN" }
+ GOTO 640
+ 641 CONTINUE
+ ENDIF
+ ENDDO
+ GOTO 700
+ 640 CONTINUE
+ GOTO I640 ! { dg-warning "Deleted feature: Assigned" "Assigned GO TO" }
+ 700 CONTINUE
+ GOTO I760 ! { dg-warning "Deleted feature: Assigned" "Assigned GO TO" }
+ 800 CONTINUE
+ GOTO I800 ! { dg-warning "Deleted feature: Assigned" "Assigned GO TO" }
+ END
[-- Attachment #3: Type: text/plain, Size: 257 bytes --]
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR debug/46576] don't reset prev_nonjump_insn at debug insns
2010-12-08 6:35 [PR debug/46576] don't reset prev_nonjump_insn at debug insns Alexandre Oliva
@ 2010-12-08 10:56 ` Richard Guenther
2010-12-15 11:06 ` Dave Korn
1 sibling, 0 replies; 5+ messages in thread
From: Richard Guenther @ 2010-12-08 10:56 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-patches
On Wed, Dec 8, 2010 at 5:11 AM, Alexandre Oliva <aoliva@redhat.com> wrote:
> mark_all_labels() retains information from the prior insn to attempt to
> fill in the JUMP_LABEL of a computed jump. If there happens to be a
> debug insn between them, we won't fill in the JUMP_LABEL, and
> -fcompare-debug fails. Presumably in larger testcases this may also
> lead to codegen differences.
>
> This patch skips debug insns while scanning basic blocks, so that we
> don't reset prev_nonjump_insn and don't otherwise waste time at them.
>
> Regstrapped on x86_64-linux-gnu. Ok to install?
Ok.
Thanks,
Richard.
>
>
> --
> 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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR debug/46576] don't reset prev_nonjump_insn at debug insns
2010-12-08 6:35 [PR debug/46576] don't reset prev_nonjump_insn at debug insns Alexandre Oliva
2010-12-08 10:56 ` Richard Guenther
@ 2010-12-15 11:06 ` Dave Korn
2010-12-15 16:16 ` H.J. Lu
2010-12-15 21:39 ` Alexandre Oliva
1 sibling, 2 replies; 5+ messages in thread
From: Dave Korn @ 2010-12-15 11:06 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-patches
On 08/12/2010 04:11, Alexandre Oliva wrote:
> PR debug/46576
> * jump.c (mark_all_labels): Skip debug insns.
> PR debug/46576
> * gfortran.dg/debug/pr46576.f: New.
Wrong PR number all round there! I think you meant 46756.
cheers,
DaveK
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR debug/46576] don't reset prev_nonjump_insn at debug insns
2010-12-15 11:06 ` Dave Korn
@ 2010-12-15 16:16 ` H.J. Lu
2010-12-15 21:39 ` Alexandre Oliva
1 sibling, 0 replies; 5+ messages in thread
From: H.J. Lu @ 2010-12-15 16:16 UTC (permalink / raw)
To: Dave Korn; +Cc: Alexandre Oliva, gcc-patches
On Wed, Dec 15, 2010 at 2:39 AM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
> On 08/12/2010 04:11, Alexandre Oliva wrote:
>
>> PR debug/46576
>> * jump.c (mark_all_labels): Skip debug insns.
>
>> PR debug/46576
>> * gfortran.dg/debug/pr46576.f: New.
>
>
> Wrong PR number all round there! I think you meant 46756.
>
I checked in
http://gcc.gnu.org/ml/gcc-cvs/2010-12/msg00538.html
http://gcc.gnu.org/ml/gcc-cvs/2010-12/msg00539.html
--
H.J.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR debug/46576] don't reset prev_nonjump_insn at debug insns
2010-12-15 11:06 ` Dave Korn
2010-12-15 16:16 ` H.J. Lu
@ 2010-12-15 21:39 ` Alexandre Oliva
1 sibling, 0 replies; 5+ messages in thread
From: Alexandre Oliva @ 2010-12-15 21:39 UTC (permalink / raw)
To: Dave Korn; +Cc: gcc-patches
On Dec 15, 2010, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
> On 08/12/2010 04:11, Alexandre Oliva wrote:
>> PR debug/46576
>> * jump.c (mark_all_labels): Skip debug insns.
>> PR debug/46576
>> * gfortran.dg/debug/pr46576.f: New.
> Wrong PR number all round there! I think you meant 46756.
Indeed :-(
Hey, at least I was self-consistent! :-)
Thanks!
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-15 20:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-08 6:35 [PR debug/46576] don't reset prev_nonjump_insn at debug insns Alexandre Oliva
2010-12-08 10:56 ` Richard Guenther
2010-12-15 11:06 ` Dave Korn
2010-12-15 16:16 ` H.J. Lu
2010-12-15 21:39 ` Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).