Commit 8eedca0d by Richard Biener Committed by Richard Biener

re PR tree-optimization/77318 (FAIL: gfortran.dg/graphite/pr68279.f90 -O …

re PR tree-optimization/77318 (FAIL: gfortran.dg/graphite/pr68279.f90   -O  (internal compiler error))

2017-01-31  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77318
	* graphite-sese-to-poly.c (extract_affine): Fix assert.
	(create_pw_aff_from_tree): Take loop parameter.
	(add_condition_to_pbb): Pass loop of the condition to
	create_pw_aff_from_tree.

From-SVN: r245064
parent dced339c
2017-01-31 Richard Biener <rguenther@suse.de>
PR tree-optimization/77318
* graphite-sese-to-poly.c (extract_affine): Fix assert.
(create_pw_aff_from_tree): Take loop parameter.
(add_condition_to_pbb): Pass loop of the condition to
create_pw_aff_from_tree.
2017-01-31 Jakub Jelinek <jakub@redhat.com> 2017-01-31 Jakub Jelinek <jakub@redhat.com>
* config/s390/s390.c (s390_asan_shadow_offset): New function. * config/s390/s390.c (s390_asan_shadow_offset): New function.
......
...@@ -407,7 +407,7 @@ extract_affine (scop_p s, tree e, __isl_take isl_space *space) ...@@ -407,7 +407,7 @@ extract_affine (scop_p s, tree e, __isl_take isl_space *space)
case SSA_NAME: case SSA_NAME:
gcc_assert (-1 != parameter_index_in_region_1 (e, s->scop_info) gcc_assert (-1 != parameter_index_in_region_1 (e, s->scop_info)
|| !invariant_in_sese_p_rec (e, s->scop_info->region, NULL)); || defined_in_sese_p (e, s->scop_info->region));
res = extract_affine_name (s, e, space); res = extract_affine_name (s, e, space);
break; break;
...@@ -436,11 +436,11 @@ extract_affine (scop_p s, tree e, __isl_take isl_space *space) ...@@ -436,11 +436,11 @@ extract_affine (scop_p s, tree e, __isl_take isl_space *space)
/* Returns a linear expression for tree T evaluated in PBB. */ /* Returns a linear expression for tree T evaluated in PBB. */
static isl_pw_aff * static isl_pw_aff *
create_pw_aff_from_tree (poly_bb_p pbb, tree t) create_pw_aff_from_tree (poly_bb_p pbb, loop_p loop, tree t)
{ {
scop_p scop = PBB_SCOP (pbb); scop_p scop = PBB_SCOP (pbb);
t = scalar_evolution_in_region (scop->scop_info->region, pbb_loop (pbb), t); t = scalar_evolution_in_region (scop->scop_info->region, loop, t);
gcc_assert (!chrec_contains_undetermined (t)); gcc_assert (!chrec_contains_undetermined (t));
gcc_assert (!automatically_generated_chrec_p (t)); gcc_assert (!automatically_generated_chrec_p (t));
...@@ -455,8 +455,9 @@ create_pw_aff_from_tree (poly_bb_p pbb, tree t) ...@@ -455,8 +455,9 @@ create_pw_aff_from_tree (poly_bb_p pbb, tree t)
static void static void
add_condition_to_pbb (poly_bb_p pbb, gcond *stmt, enum tree_code code) add_condition_to_pbb (poly_bb_p pbb, gcond *stmt, enum tree_code code)
{ {
isl_pw_aff *lhs = create_pw_aff_from_tree (pbb, gimple_cond_lhs (stmt)); loop_p loop = gimple_bb (stmt)->loop_father;
isl_pw_aff *rhs = create_pw_aff_from_tree (pbb, gimple_cond_rhs (stmt)); isl_pw_aff *lhs = create_pw_aff_from_tree (pbb, loop, gimple_cond_lhs (stmt));
isl_pw_aff *rhs = create_pw_aff_from_tree (pbb, loop, gimple_cond_rhs (stmt));
isl_set *cond; isl_set *cond;
switch (code) switch (code)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment