public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/38446] New: [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop.
@ 2008-12-08 17:26 hjagasia at gcc dot gnu dot org
2008-12-08 17:27 ` [Bug c/38446] " hjagasia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: hjagasia at gcc dot gnu dot org @ 2008-12-08 17:26 UTC (permalink / raw)
To: gcc-bugs
gloog calls rewrite_into_sese_closed_ssa, which in turn calls
sese_find_uses_to_rename_bb. sese_find_uses_to_rename_bb looks at every phi in
every basic block. For each incoming edge into that basic block which is
associated with the corresponding use argument of the phi, graphite then calls
sese_find_uses_to_rename_bb. Now for the use found, the def_bb is looked up. If
the def_bb exists and def_bb belongs to the scop and use_bb does not belong to
scope, then a phi is created that can reach the use_bb because def_bb does not
reach use_bb.
Right now the check which determines if def_bb belongs to the scop and use_bb
does not belong to scop is broken since it looks at dominators and post
dominators instead of travesing or looking up the bb's in scop which match with
a given bb.
--
Summary: [graphite] The def for a var exists inside one of the
scops bb's but an appropriate phi is not created to
allow the phi to reach the use of that def ouside the
scop.
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: hjagasia at gcc dot gnu dot org
ReportedBy: hjagasia at gcc dot gnu dot org
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38446
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/38446] [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop.
2008-12-08 17:26 [Bug c/38446] New: [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop hjagasia at gcc dot gnu dot org
@ 2008-12-08 17:27 ` hjagasia at gcc dot gnu dot org
2008-12-10 21:10 ` [Bug middle-end/38446] " hjagasia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: hjagasia at gcc dot gnu dot org @ 2008-12-08 17:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from hjagasia at gcc dot gnu dot org 2008-12-08 17:26 -------
Created an attachment (id=16852)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16852&action=view)
Reduced test case for bug
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38446
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/38446] [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop.
2008-12-08 17:26 [Bug c/38446] New: [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop hjagasia at gcc dot gnu dot org
2008-12-08 17:27 ` [Bug c/38446] " hjagasia at gcc dot gnu dot org
@ 2008-12-10 21:10 ` hjagasia at gcc dot gnu dot org
2008-12-10 22:35 ` hjagasia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: hjagasia at gcc dot gnu dot org @ 2008-12-10 21:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from hjagasia at gcc dot gnu dot org 2008-12-10 21:09 -------
Created an attachment (id=16877)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16877&action=view)
This patch fixes PR38446 by explicitly checking if bb belongs to sese region by
looking at all bbs in scop instead of using dominator/post-dominator
information.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38446
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/38446] [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop.
2008-12-08 17:26 [Bug c/38446] New: [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop hjagasia at gcc dot gnu dot org
2008-12-08 17:27 ` [Bug c/38446] " hjagasia at gcc dot gnu dot org
2008-12-10 21:10 ` [Bug middle-end/38446] " hjagasia at gcc dot gnu dot org
@ 2008-12-10 22:35 ` hjagasia at gcc dot gnu dot org
2008-12-10 22:37 ` Sebastian Pop
2008-12-10 22:39 ` sebpop at gmail dot com
` (3 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: hjagasia at gcc dot gnu dot org @ 2008-12-10 22:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hjagasia at gcc dot gnu dot org 2008-12-10 22:34 -------
Created an attachment (id=16880)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16880&action=view)
Updated patch reviewed by Sebastian
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38446
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Bug middle-end/38446] [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop.
2008-12-10 22:35 ` hjagasia at gcc dot gnu dot org
@ 2008-12-10 22:37 ` Sebastian Pop
0 siblings, 0 replies; 9+ messages in thread
From: Sebastian Pop @ 2008-12-10 22:37 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
On Wed, Dec 10, 2008 at 4:34 PM, hjagasia at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #3 from hjagasia at gcc dot gnu dot org 2008-12-10 22:34 -------
> Created an attachment (id=16880)
> --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16880&action=view)
> Updated patch reviewed by Sebastian
This looks better thanks. Ok for graphite branch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/38446] [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop.
2008-12-08 17:26 [Bug c/38446] New: [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop hjagasia at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-12-10 22:35 ` hjagasia at gcc dot gnu dot org
@ 2008-12-10 22:39 ` sebpop at gmail dot com
2008-12-11 17:29 ` hjagasia at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: sebpop at gmail dot com @ 2008-12-10 22:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sebpop at gmail dot com 2008-12-10 22:37 -------
Subject: Re: [graphite] The def for a var exists inside one of the scops bb's
but an appropriate phi is not created to allow the phi to reach the use of that
def ouside the scop.
On Wed, Dec 10, 2008 at 4:34 PM, hjagasia at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #3 from hjagasia at gcc dot gnu dot org 2008-12-10 22:34 -------
> Created an attachment (id=16880)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16880&action=view)
> --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16880&action=view)
> Updated patch reviewed by Sebastian
This looks better thanks. Ok for graphite branch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38446
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/38446] [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop.
2008-12-08 17:26 [Bug c/38446] New: [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop hjagasia at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-12-10 22:39 ` sebpop at gmail dot com
@ 2008-12-11 17:29 ` hjagasia at gcc dot gnu dot org
2008-12-11 19:38 ` spop at gcc dot gnu dot org
2008-12-11 19:42 ` spop at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: hjagasia at gcc dot gnu dot org @ 2008-12-11 17:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from hjagasia at gcc dot gnu dot org 2008-12-11 17:27 -------
Subject: Bug 38446
Author: hjagasia
Date: Thu Dec 11 17:26:28 2008
New Revision: 142685
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142685
Log:
2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
PR tree-optimization/38446
* gcc.dg/graphite/pr38446.c: New.
* graphite.c (register_bb_in_sese): New.
(bb_in_sese_p): Check if bb belongs to sese region by explicitly
looking at the bbs in the region.
* graphite.h (sese): Add region_basic_blocks pointer set to
structure and initialize at the time of defining new scop.
Added:
branches/graphite/gcc/testsuite/gcc.dg/graphite/pr38446.c
Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/graphite.c
branches/graphite/gcc/graphite.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38446
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/38446] [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop.
2008-12-08 17:26 [Bug c/38446] New: [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop hjagasia at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-12-11 17:29 ` hjagasia at gcc dot gnu dot org
@ 2008-12-11 19:38 ` spop at gcc dot gnu dot org
2008-12-11 19:42 ` spop at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu dot org @ 2008-12-11 19:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from spop at gcc dot gnu dot org 2008-12-11 19:37 -------
Subject: Bug 38446
Author: spop
Date: Thu Dec 11 19:35:41 2008
New Revision: 142688
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142688
Log:
2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
PR tree-optimization/38446
* graphite.c (register_bb_in_sese): New.
(bb_in_sese_p): Check if bb belongs to sese region by explicitly
looking at the bbs in the region.
* graphite.h (sese): Add region_basic_blocks pointer set to
structure and initialize at the time of defining new scop.
2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
* graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
(find_params_in_bb): Do not free data refs.
(free_graphite_bb): Add FIXME on disabled free_data_refs.
2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
* graphite.c (struct ivtype_map_elt): New.
(debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
gcc_type_for_cloog_iv): New.
(loop_iv_stack_patch_for_consts): Use the type of the induction
variable from the original loop, except for the automatically
generated loops, i.e., in the case of a strip-mined loop, in
which case there is no original loop: in that case just use
integer_type_node.
(new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
(free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
(clast_name_to_gcc): Accept params to be NULL.
(clast_to_gcc_expression): Take an extra parameter for the type.
Convert to that type all the expressions built by this function.
(gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
(graphite_translate_clast_equation): Compute the type of the
clast_equation before translating its LHS and RHS.
(clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
(graphite_create_new_loop): Compute the type of the induction
variable before translating the lower and upper bounds and before
creating the induction variable.
(rename_variables_from_edge, rename_phis_end_scop): New.
(copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
(sese_add_exit_phis_edge): Do not use integer_zero_node.
(find_cloog_iv_in_expr, compute_cloog_iv_types_1,
compute_cloog_iv_types): New.
(gloog): Call compute_cloog_iv_types before starting the
translation of the clast.
* graphite.h (struct graphite_bb): New field cloog_iv_types.
(GBB_CLOOG_IV_TYPES): New.
(debug_ivtype_map): Declared.
(oldiv_for_loop): New.
2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
PR middle-end/38459
* graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
(param_index): Assert if parameter is not know after parameter
detection.
(find_params_in_bb): Detect params directly in GBB_CONDITIONS.
(find_scop_parameters): Mark, that we have finished parameter
detection.
(graphite_transform_loops): Move condition detection before parameter
detection.
* graphite.h (struct scop): Add SCOP_ADD_PARAMS.
2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
PR tree-optimization/38446
* gcc.dg/graphite/pr38446.c: New.
2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
* gcc.dg/graphite/scop-16.c: Test only scop specific info.
* gcc.dg/graphite/scop-17.c: Same.
* gcc.dg/graphite/block-5.c: New.
* gcc.dg/graphite/block-6.c: New.
* gcc.dg/graphite/pr37485.c: Clean dump file after.
* gcc.dg/graphite/pr37684.c: Same.
* gcc.dg/graphite/block-2.c: Same.
2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
PR middle-end/38459
* gfortran.dg/graphite/pr38459.f90: New.
Added:
trunk/gcc/testsuite/gcc.dg/graphite/block-2.c
trunk/gcc/testsuite/gcc.dg/graphite/block-5.c
trunk/gcc/testsuite/gcc.dg/graphite/block-6.c
trunk/gcc/testsuite/gcc.dg/graphite/pr38446.c
trunk/gcc/testsuite/gfortran.dg/graphite/pr38459.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/graphite.c
trunk/gcc/graphite.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/graphite/pr37485.c
trunk/gcc/testsuite/gcc.dg/graphite/pr37684.c
trunk/gcc/testsuite/gcc.dg/graphite/scop-15.c
trunk/gcc/testsuite/gcc.dg/graphite/scop-16.c
trunk/gcc/testsuite/gcc.dg/graphite/scop-17.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38446
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/38446] [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop.
2008-12-08 17:26 [Bug c/38446] New: [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop hjagasia at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-12-11 19:38 ` spop at gcc dot gnu dot org
@ 2008-12-11 19:42 ` spop at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu dot org @ 2008-12-11 19:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from spop at gcc dot gnu dot org 2008-12-11 19:39 -------
Fixed.
--
spop at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38446
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-12-11 19:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-08 17:26 [Bug c/38446] New: [graphite] The def for a var exists inside one of the scops bb's but an appropriate phi is not created to allow the phi to reach the use of that def ouside the scop hjagasia at gcc dot gnu dot org
2008-12-08 17:27 ` [Bug c/38446] " hjagasia at gcc dot gnu dot org
2008-12-10 21:10 ` [Bug middle-end/38446] " hjagasia at gcc dot gnu dot org
2008-12-10 22:35 ` hjagasia at gcc dot gnu dot org
2008-12-10 22:37 ` Sebastian Pop
2008-12-10 22:39 ` sebpop at gmail dot com
2008-12-11 17:29 ` hjagasia at gcc dot gnu dot org
2008-12-11 19:38 ` spop at gcc dot gnu dot org
2008-12-11 19:42 ` spop at gcc dot gnu dot org
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).