[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-12-02 Thread spop at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297

--- Comment #13 from Sebastian Pop spop at gcc dot gnu.org 2010-12-02 
20:13:16 UTC ---
Author: spop
Date: Thu Dec  2 20:13:11 2010
New Revision: 167390

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=167390
Log:
Fix PR45297: handle ADDR_EXPR in interpret_rhs_expr as in follow_ssa_edge_expr.

2010-12-01  Sebastian Pop  sebastian@amd.com

PR middle-end/45297
* tree-scalar-evolution.c (interpret_rhs_expr): Handle ADDR_EXPR
with MEM_REFs as POINTER_PLUS_EXPR.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-scalar-evolution.c


[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-12-02 Thread spop at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297

Sebastian Pop spop at gcc dot gnu.org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #14 from Sebastian Pop spop at gcc dot gnu.org 2010-12-02 
20:14:45 UTC ---
Fixed again.


[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-12-01 Thread spop at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297

--- Comment #6 from Sebastian Pop spop at gcc dot gnu.org 2010-12-01 17:25:15 
UTC ---
Author: spop
Date: Wed Dec  1 17:25:10 2010
New Revision: 167348

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=167348
Log:
Postpone the rewrite out of SSA to the end of the translation to polyhedral
representation.

2010-11-22  Sebastian Pop  sebastian@amd.com

PR middle-end/45297
* graphite-poly.c (new_poly_bb): Returns a poly_bb_p.  Do not take
the reduction bool in parameter.  Clear PBB_IS_REDUCTION.  Set GBB_PBB.
* graphite-poly.h (new_poly_bb): Update declaration.
(gbb_from_bb): Moved here...
(pbb_from_bb): New.
* graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node):
Removed.
(graphite_stmt_p): Removed.
(try_generate_gimple_bb): Returns a gimple_bb_p.  Do not pass in
sbitmap reductions.  Always build a gimple_bb_p.  Do not call
new_poly_bb.
(build_scop_bbs_1): Do not pass in sbitmap reductions.
(build_scop_bbs): Same.
(gbb_from_bb): ... from here.
(add_conditions_to_constraints): Moved up.
(analyze_drs): New.
(build_scop_drs): Call analyze_drs.  Remove all the PBBs that do
not contain data references.
(new_pbb_from_pbb): New.
(insert_out_of_ssa_copy_on_edge): Call new_pbb_from_pbb after a
block is split.
(rewrite_close_phi_out_of_ssa): Update call to
insert_out_of_ssa_copy_on_edge.
(rewrite_reductions_out_of_ssa): Now static.
(rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
(split_pbb): New.
(split_reduction_stmt): Call split_pbb.
(translate_scalar_reduction_to_array): Pass in the scop, do not
pass in the sbitmap reductions.
(rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
(rewrite_commutative_reductions_out_of_ssa_loop): Same.
(rewrite_commutative_reductions_out_of_ssa): Same.
(build_poly_scop): Call build_scop_bbs,
rewrite_commutative_reductions_out_of_ssa,
rewrite_reductions_out_of_ssa, and
rewrite_cross_bb_scalar_deps_out_of_ssa.  Move build_scop_drs
before scop_to_lst.
* graphite-sese-to-poly.h (rewrite_commutative_reductions_out_of_ssa):
Removed declaration.
(rewrite_reductions_out_of_ssa): Same.
(rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
(build_scop_bbs): Same.
* graphite.c (graphite_transform_loops): Do not initialize reductions.
Do not call build_scop_bbs,
rewrite_commutative_reductions_out_of_ssa,
rewrite_reductions_out_of_ssa, and
rewrite_cross_bb_scalar_deps_out_of_ssa.
* sese.h (struct gimple_bb): Add field pbb.
(GBB_PBB): New.

* gcc.dg/graphite/pr45297.c: New.

Added:
trunk/gcc/testsuite/gcc.dg/graphite/pr45297.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ChangeLog.graphite
trunk/gcc/graphite-poly.c
trunk/gcc/graphite-poly.h
trunk/gcc/graphite-sese-to-poly.c
trunk/gcc/graphite-sese-to-poly.h
trunk/gcc/graphite.c
trunk/gcc/sese.h
trunk/gcc/testsuite/ChangeLog


[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-12-01 Thread spop at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297

Sebastian Pop spop at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #7 from Sebastian Pop spop at gcc dot gnu.org 2010-12-01 17:26:25 
UTC ---
Fixed.


[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-12-01 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297

Jack Howarth howarth at nitro dot med.uc.edu changed:

   What|Removed |Added

 CC||howarth at nitro dot
   ||med.uc.edu

--- Comment #8 from Jack Howarth howarth at nitro dot med.uc.edu 2010-12-01 
19:05:48 UTC ---
The new testcase fails on x86_64-apple-darwin10 as...

FAIL: gcc.dg/graphite/pr45297.c (internal compiler error)
FAIL: gcc.dg/graphite/pr45297.c (test for excess errors)

with the error...

 /Users/howarth/darwin_objdir/gcc/xgcc -B/Users/howarth/darwin_objdir/gcc/
/Users/howarth/gcc/gcc/testsuite/gcc.dg/graphite/pr45297.c   -Os
-fgraphite-identity -S  -m32 -o pr45297.s
/Users/howarth/gcc/gcc/testsuite/gcc.dg/graphite/pr45297.c: In function 'foo':
/Users/howarth/gcc/gcc/testsuite/gcc.dg/graphite/pr45297.c:4:1: internal
compiler error: in rename_uses, at sese.c:533

which backtraces as...

Breakpoint 1, fancy_abort (file=0x1009ea1e0 ../../gcc/gcc/sese.c, line=533,
function=0x1009ea2fe rename_uses) at ../../gcc/gcc/diagnostic.c:893
893  internal_error (in %s, at %s:%d, function, trim_filename (file),
line);
(gdb) bt
#0  fancy_abort (file=0x1009ea1e0 ../../gcc/gcc/sese.c, line=533,
function=0x1009ea2fe rename_uses) at ../../gcc/gcc/diagnostic.c:893
#1  0x000100663a2a in copy_bb_and_scalar_dependences (bb=value temporarily
unavailable, due to optimizations, region=0x142032f40, next_e=0x143b27880,
iv_map=0x14205a5c0) at ../../gcc/gcc/sese.c:533
#2  0x0001004db6c2 in translate_clast (region=0x142032f40,
context_loop=0x143a0ad48, stmt=0x142059a10, next_e=0x143b27840,
newivs=0x7fff5fbfe388, newivs_index=0x14205a610, bb_pbb_mapping=0x142032d10,
level=2, params_index=0x14203d000) at
../../gcc/gcc/graphite-clast-to-gimple.c:947
#3  0x0001004dab17 in translate_clast (region=0x142032f40,
context_loop=0x143a0ad48, stmt=0x14205d8f0, next_e=0x143b27840,
newivs=0x7fff5fbfe388, newivs_index=0x14205a610, bb_pbb_mapping=0x142032d10,
level=2, params_index=0x14203d000) at
../../gcc/gcc/graphite-clast-to-gimple.c:1138
#4  0x0001004db564 in translate_clast_for_loop [inlined] () at
/Users/howarth/gcc/gcc/graphite-clast-to-gimple.c:1028
#5  0x0001004db564 in translate_clast_for [inlined] () at
/Users/howarth/gcc/gcc/graphite-clast-to-gimple.c:1061
#6  0x0001004db564 in translate_clast (region=0x142032f40,
context_loop=0x143a0abb0, stmt=0x14205bab0, next_e=0x143b27440,
newivs=0x7fff5fbfe388, newivs_index=0x14205a610, bb_pbb_mapping=0x142032d10,
level=1, params_index=0x14203d000) at
../../gcc/gcc/graphite-clast-to-gimple.c:1116
#7  0x0001004dab17 in translate_clast (region=0x142032f40,
context_loop=0x143a0abb0, stmt=0x142059840, next_e=0x143b27440,
newivs=0x7fff5fbfe388, newivs_index=0x14205a610, bb_pbb_mapping=0x142032d10,
level=1, params_index=0x14203d000) at
../../gcc/gcc/graphite-clast-to-gimple.c:1138
#8  0x0001004dbac1 in graphite_verify [inlined] () at
/Users/howarth/gcc/gcc/graphite-clast-to-gimple.c:1553
#9  0x0001004dbac1 in gloog (scop=value temporarily unavailable, due to
optimizations, bb_pbb_mapping=0x142032d10) at
../../gcc/gcc/graphite-clast-to-gimple.c:1557
#10 0x0001004d76a1 in graphite_transform_loops () at
../../gcc/gcc/graphite.c:284
#11 0x00010079ce7a in graphite_transforms () at
../../gcc/gcc/tree-ssa-loop.c:296
#12 0x0001005c9916 in execute_one_pass (pass=0x100bdbe00) at
../../gcc/gcc/passes.c:1553
#13 0x0001005c9d7d in execute_pass_list (pass=0x100bdbe00) at
../../gcc/gcc/passes.c:1608
#14 0x0001005c9d8f in execute_pass_list (pass=0x100bdbda0) at
../../gcc/gcc/passes.c:1609
#15 0x0001005c9d8f in execute_pass_list (pass=0x100bdbb00) at
../../gcc/gcc/passes.c:1609
#16 0x0001005c9d8f in execute_pass_list (pass=0x100bdb1a0) at
../../gcc/gcc/passes.c:1609
#17 0x0001006ff990 in invoke_plugin_callbacks [inlined] () at
/Users/howarth/gcc/gcc/plugin.h:422
#18 0x0001006ff990 in tree_rest_of_compilation (fndecl=0x143b0b200) at
../../gcc/gcc/tree-optimize.c:425
#19 0x0001008fabb9 in cgraph_expand_function (node=0x143b29000) at
../../gcc/gcc/cgraphunit.c:1508
#20 0x0001008fdb5c in cgraph_expand_all_functions [inlined] () at
/Users/howarth/gcc/gcc/cgraphunit.c:1567
#21 0x0001008fdb5c in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1827
#22 0x0001008fe021 in timevar_pop [inlined] () at
/Users/howarth/gcc/gcc/timevar.h:1031
#23 0x0001008fe021 in cgraph_finalize_compilation_unit () at
../../gcc/gcc/cgraphunit.c:1033
#24 0x0001c7af in c_write_global_declarations () at
../../gcc/gcc/c-decl.c:9840
#25 0x000100689f91 in do_compile () at ../../gcc/gcc/toplev.c:591
#26 0x00010068a799 in toplev_main (argc=27, argv=0x7fff5fbfe800) at
../../gcc/gcc/toplev.c:1937
#27 0x00011504 in start ()


[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-12-01 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297

--- Comment #9 from Jack Howarth howarth at nitro dot med.uc.edu 2010-12-01 
19:10:07 UTC ---
Note that I see these failures with either ppl-0.10.2 and legacy cloog-ppl or
ppl-0.11 and cloog-isl.


[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-12-01 Thread spop at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297

Sebastian Pop spop at gcc dot gnu.org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #10 from Sebastian Pop spop at gcc dot gnu.org 2010-12-01 
19:45:10 UTC ---
I see the same failure on amd64-linux with 
./cc1 -m32 -Os -fgraphite-identity pr45297.c

I will have a look at this.


[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-12-01 Thread spop at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297

--- Comment #11 from Sebastian Pop spop at gcc dot gnu.org 2010-12-01 
20:15:29 UTC ---
In this code:

bb 3:
  q_5 = MEM[(void *)q_1 + 4294967288B];

bb 4:
  # q_1 = PHI q_3(2), q_5(3)
  if (q_1 != p_2(D))
goto bb 3;
  else
goto bb 5;

scev analysis is able to determine that q1 = {q_3, +, -8}_1 and in the
same time, scev fails to analyze q5.  And that triggers a rewrite of
q_5 out of SSA making the scev analysis of q1 impossible.


[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-12-01 Thread spop at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297

Sebastian Pop spop at gcc dot gnu.org changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #12 from Sebastian Pop spop at gcc dot gnu.org 2010-12-01 
21:42:38 UTC ---
*** Bug 46754 has been marked as a duplicate of this bug. ***


[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-11-22 Thread spop at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297

--- Comment #5 from Sebastian Pop spop at gcc dot gnu.org 2010-11-22 23:17:35 
UTC ---
Author: spop
Date: Mon Nov 22 23:17:25 2010
New Revision: 167060

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=167060
Log:
Postpone the rewrite out of SSA to the end of the translation to polyhedral
representation.

2010-11-22  Sebastian Pop  sebastian@amd.com

PR middle-end/45297
* graphite-poly.c (new_poly_bb): Returns a poly_bb_p.  Do not take
the reduction bool in parameter.  Clear PBB_IS_REDUCTION.  Set GBB_PBB.
* graphite-poly.h (new_poly_bb): Update declaration.
(gbb_from_bb): Moved here...
(pbb_from_bb): New.
* graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node):
Removed.
(graphite_stmt_p): Removed.
(try_generate_gimple_bb): Returns a gimple_bb_p.  Do not pass in
sbitmap reductions.  Always build a gimple_bb_p.  Do not call
new_poly_bb.
(build_scop_bbs_1): Do not pass in sbitmap reductions.
(build_scop_bbs): Same.
(gbb_from_bb): ... from here.
(add_conditions_to_constraints): Moved up.
(analyze_drs): New.
(build_scop_drs): Call analyze_drs.  Remove all the PBBs that do
not contain data references.
(new_pbb_from_pbb): New.
(insert_out_of_ssa_copy_on_edge): Call new_pbb_from_pbb after a
block is split.
(rewrite_close_phi_out_of_ssa): Update call to
insert_out_of_ssa_copy_on_edge.
(rewrite_reductions_out_of_ssa): Now static.
(rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
(split_pbb): New.
(split_reduction_stmt): Call split_pbb.
(translate_scalar_reduction_to_array): Pass in the scop, do not
pass in the sbitmap reductions.
(rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
(rewrite_commutative_reductions_out_of_ssa_loop): Same.
(rewrite_commutative_reductions_out_of_ssa): Same.
(build_poly_scop): Call build_scop_bbs,
rewrite_commutative_reductions_out_of_ssa,
rewrite_reductions_out_of_ssa, and
rewrite_cross_bb_scalar_deps_out_of_ssa.  Move build_scop_drs
before scop_to_lst.
* graphite-sese-to-poly.h (rewrite_commutative_reductions_out_of_ssa):
Removed declaration.
(rewrite_reductions_out_of_ssa): Same.
(rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
(build_scop_bbs): Same.
* graphite.c (graphite_transform_loops): Do not initialize reductions.
Do not call build_scop_bbs,
rewrite_commutative_reductions_out_of_ssa,
rewrite_reductions_out_of_ssa, and
rewrite_cross_bb_scalar_deps_out_of_ssa.
* sese.h (struct gimple_bb): Add field pbb.
(GBB_PBB): New.

* gcc.dg/graphite/pr45297.c: New.

Added:
branches/graphite/gcc/testsuite/gcc.dg/graphite/pr45297.c
Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/graphite-poly.c
branches/graphite/gcc/graphite-poly.h
branches/graphite/gcc/graphite-sese-to-poly.c
branches/graphite/gcc/graphite-sese-to-poly.h
branches/graphite/gcc/graphite.c
branches/graphite/gcc/sese.h


[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-11-10 Thread spop at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297

Sebastian Pop spop at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2010.11.10 16:38:55
 AssignedTo|unassigned at gcc dot   |spop at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #4 from Sebastian Pop spop at gcc dot gnu.org 2010-11-10 16:38:55 
UTC ---
Mine.


[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-09-02 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297



[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-08-30 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297



[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-08-21 Thread howarth at nitro dot med dot uc dot edu


--- Comment #2 from howarth at nitro dot med dot uc dot edu  2010-08-21 
16:46 ---
This also appears to be causing the testsuite failures of...

FAIL: gcc.c-torture/execute/921013-1.c compilation,  -O2  (internal compiler
error)
FAIL: gcc.c-torture/execute/921013-1.c compilation,  -O2 -flto  (internal
compiler error)
FAIL: gcc.c-torture/execute/921013-1.c compilation,  -O2 -fwhopr  (internal
compiler error)

at -m32 and...

FAIL: gcc.c-torture/execute/990513-1.c compilation,  -Os  (internal compiler
error)

at both -m32 and -m64.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297



[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-08-21 Thread howarth at nitro dot med dot uc dot edu


--- Comment #3 from howarth at nitro dot med dot uc dot edu  2010-08-21 
16:47 ---
(In reply to comment #2)

the above was with use of...


Index: opts.c
===
--- opts.c  (revision 162966)
+++ opts.c  (working copy)
@@ -781,6 +781,9 @@

   /* -O2 optimizations.  */
   opt2 = (optimize = 2);
+#ifdef HAVE_cloog
+  flag_graphite_identity = opt2;
+#endif
   flag_inline_small_functions = opt2;
   flag_indirect_inlining = opt2;
   flag_partial_inlining = opt2;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297



[Bug middle-end/45297] [4.6 Regression] ICE: in create_linear_expr_from_tree, at graphite-sese-to-poly.c:1210 with -Os -fgraphite-identity

2010-08-16 Thread zsojka at seznam dot cz


--- Comment #1 from zsojka at seznam dot cz  2010-08-16 11:14 ---
Created an attachment (id=21489)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21489action=view)
reduced testcase (from gcc.c-torture/execute/990513-1.c)

$ gcc -Os -fgraphite-identity pr45297.c
pr45297.c: In function 'foo':
pr45297.c:2:1: internal compiler error: in create_linear_expr_from_tree, at
graphite-sese-to-poly.c:1210


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45297