* [PR44181] skip debug insns when inserting IV updates
@ 2010-06-11 19:41 Alexandre Oliva
2010-06-11 23:46 ` Richard Guenther
2010-12-10 17:02 ` H.J. Lu
0 siblings, 2 replies; 4+ messages in thread
From: Alexandre Oliva @ 2010-06-11 19:41 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 902 bytes --]
A number of graphite -fcompare-debug bug reports were fixed with this
patch. The problem was that we inserted induction variable increment
stmts before the last stmt in the block, but if the block ended with a
fall-through, the insert would be before a non-debug stmt in the non-VTA
case, whereas in the VTA case it could be before a debug stmt, after the
non-debug stmt. Skipping trailing debug stmts so that we insert before
the last non-debug stmt removed the codegen differences.
Bootstrapped the compiler, along with the upcoming patch for PR43656, on
x86_64-linux-gnu, with the following options:
-O2 -g -fschedule-insns -fsched-pressure -funroll-loops -fgraphite-identity
for stage2 and stage3 host, and for stage3 libs (also -fcompare-debug)
I got build failures on zlib and libada, presumably because of this
unusual combination of flags, but no -fcompare-debug errors.
Ok to install?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vta-loop-manip-stabilize-iv-pr44181.patch --]
[-- Type: text/x-diff, Size: 1259 bytes --]
for gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
PR debug/43650
PR debug/44181
PR debug/44247
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Skip
debug stmts.
(canonicalize_loop_ivs): Likewise.
Index: gcc/tree-ssa-loop-manip.c
===================================================================
--- gcc/tree-ssa-loop-manip.c.orig 2010-06-11 09:16:28.000000000 -0300
+++ gcc/tree-ssa-loop-manip.c 2010-06-11 09:17:38.000000000 -0300
@@ -1081,7 +1081,7 @@ tree_transform_and_unroll_loop (struct l
/* Finally create the new counter for number of iterations and add the new
exit instruction. */
- bsi = gsi_last_bb (exit_bb);
+ bsi = gsi_last_nondebug_bb (exit_bb);
exit_if = gsi_stmt (bsi);
create_iv (exit_base, exit_step, NULL_TREE, loop,
&bsi, false, &ctr_before, &ctr_after);
@@ -1217,7 +1217,7 @@ canonicalize_loop_ivs (struct loop *loop
gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts);
}
- gsi = gsi_last_bb (bump_in_latch ? loop->latch : loop->header);
+ gsi = gsi_last_nondebug_bb (bump_in_latch ? loop->latch : loop->header);
create_iv (build_int_cst_type (type, 0), build_int_cst (type, 1), NULL_TREE,
loop, &gsi, bump_in_latch, &var_before, NULL);
[-- 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] 4+ messages in thread
* Re: [PR44181] skip debug insns when inserting IV updates
2010-06-11 19:41 [PR44181] skip debug insns when inserting IV updates Alexandre Oliva
@ 2010-06-11 23:46 ` Richard Guenther
2010-06-14 21:00 ` Alexandre Oliva
2010-12-10 17:02 ` H.J. Lu
1 sibling, 1 reply; 4+ messages in thread
From: Richard Guenther @ 2010-06-11 23:46 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-patches
On Fri, Jun 11, 2010 at 9:18 PM, Alexandre Oliva <aoliva@redhat.com> wrote:
> A number of graphite -fcompare-debug bug reports were fixed with this
> patch. The problem was that we inserted induction variable increment
> stmts before the last stmt in the block, but if the block ended with a
> fall-through, the insert would be before a non-debug stmt in the non-VTA
> case, whereas in the VTA case it could be before a debug stmt, after the
> non-debug stmt. Skipping trailing debug stmts so that we insert before
> the last non-debug stmt removed the codegen differences.
>
> Bootstrapped the compiler, along with the upcoming patch for PR43656, on
> x86_64-linux-gnu, with the following options:
>
> -O2 -g -fschedule-insns -fsched-pressure -funroll-loops -fgraphite-identity
>
> for stage2 and stage3 host, and for stage3 libs (also -fcompare-debug)
>
> I got build failures on zlib and libada, presumably because of this
> unusual combination of flags, but no -fcompare-debug errors.
>
> Ok to install?
Ok (is there a testcase that can be added to the testsuite?)
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] 4+ messages in thread
* Re: [PR44181] skip debug insns when inserting IV updates
2010-06-11 23:46 ` Richard Guenther
@ 2010-06-14 21:00 ` Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2010-06-14 21:00 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc-patches
On Jun 11, 2010, Richard Guenther <richard.guenther@gmail.com> wrote:
> On Fri, Jun 11, 2010 at 9:18 PM, Alexandre Oliva <aoliva@redhat.com> wrote:
>> A number of graphite -fcompare-debug bug reports were fixed with this
>> patch.
> Ok (is there a testcase that can be added to the testsuite?)
Nothing really useful, I'm afraid. I actually had to go back to earlier
versions of the compiler to as much as duplicate the reported problems.
They're quite sensitive to other changes in the compiler.
--
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] 4+ messages in thread
* Re: [PR44181] skip debug insns when inserting IV updates
2010-06-11 19:41 [PR44181] skip debug insns when inserting IV updates Alexandre Oliva
2010-06-11 23:46 ` Richard Guenther
@ 2010-12-10 17:02 ` H.J. Lu
1 sibling, 0 replies; 4+ messages in thread
From: H.J. Lu @ 2010-12-10 17:02 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-patches
On Fri, Jun 11, 2010 at 12:18 PM, Alexandre Oliva <aoliva@redhat.com> wrote:
> A number of graphite -fcompare-debug bug reports were fixed with this
> patch. The problem was that we inserted induction variable increment
> stmts before the last stmt in the block, but if the block ended with a
> fall-through, the insert would be before a non-debug stmt in the non-VTA
> case, whereas in the VTA case it could be before a debug stmt, after the
> non-debug stmt. Skipping trailing debug stmts so that we insert before
> the last non-debug stmt removed the codegen differences.
>
> Bootstrapped the compiler, along with the upcoming patch for PR43656, on
> x86_64-linux-gnu, with the following options:
>
> -O2 -g -fschedule-insns -fsched-pressure -funroll-loops -fgraphite-identity
>
> for stage2 and stage3 host, and for stage3 libs (also -fcompare-debug)
>
> I got build failures on zlib and libada, presumably because of this
> unusual combination of flags, but no -fcompare-debug errors.
>
This caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46885
--
H.J.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-10 16:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-11 19:41 [PR44181] skip debug insns when inserting IV updates Alexandre Oliva
2010-06-11 23:46 ` Richard Guenther
2010-06-14 21:00 ` Alexandre Oliva
2010-12-10 17:02 ` H.J. Lu
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).