Commit 3899a0b2 by Sebastian Pop Committed by Sebastian Pop

graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer loop upper…

graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer loop upper bounds for 1-element arrays at end of structures.

2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
	loop upper bounds for 1-element arrays at end of structures.
	* tree-flow.h (array_at_struct_end_p): Declared.
	* tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.

From-SVN: r154612
parent e34e5835
2009-10-20 Sebastian Pop <sebastian.pop@amd.com> 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
loop upper bounds for 1-element arrays at end of structures.
* tree-flow.h (array_at_struct_end_p): Declared.
* tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
* g++.dg/graphite/pr41305.C: New. * g++.dg/graphite/pr41305.C: New.
2009-10-20 Alexander Monakov <amonakov@ispras.ru> 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
......
...@@ -1728,10 +1728,12 @@ pdr_add_data_dimensions (ppl_Polyhedron_t accesses, data_reference_p dr, ...@@ -1728,10 +1728,12 @@ pdr_add_data_dimensions (ppl_Polyhedron_t accesses, data_reference_p dr,
high = array_ref_up_bound (ref); high = array_ref_up_bound (ref);
/* high - subscript >= 0 /* high - subscript >= 0 */
XXX: 1-element arrays at end of structures may extend over their if (high && host_integerp (high, 0)
declared size. */ /* 1-element arrays at end of structures may extend over
if (high && host_integerp (high, 0)) their declared size. */
&& !(array_at_struct_end_p (ref)
&& operand_equal_p (low, high, 0)))
{ {
ppl_new_Linear_Expression_with_dimension (&expr, accessp_nb_dims); ppl_new_Linear_Expression_with_dimension (&expr, accessp_nb_dims);
ppl_set_coef (expr, subscript, -1); ppl_set_coef (expr, subscript, -1);
......
...@@ -728,6 +728,7 @@ tree find_loop_niter (struct loop *, edge *); ...@@ -728,6 +728,7 @@ tree find_loop_niter (struct loop *, edge *);
tree loop_niter_by_eval (struct loop *, edge); tree loop_niter_by_eval (struct loop *, edge);
tree find_loop_niter_by_eval (struct loop *, edge *); tree find_loop_niter_by_eval (struct loop *, edge *);
void estimate_numbers_of_iterations (void); void estimate_numbers_of_iterations (void);
bool array_at_struct_end_p (tree);
bool scev_probably_wraps_p (tree, tree, gimple, struct loop *, bool); bool scev_probably_wraps_p (tree, tree, gimple, struct loop *, bool);
bool convert_affine_scev (struct loop *, tree, tree *, tree *, gimple, bool); bool convert_affine_scev (struct loop *, tree, tree *, tree *, gimple, bool);
......
...@@ -2612,7 +2612,7 @@ record_nonwrapping_iv (struct loop *loop, tree base, tree step, gimple stmt, ...@@ -2612,7 +2612,7 @@ record_nonwrapping_iv (struct loop *loop, tree base, tree step, gimple stmt,
allocated structure. If this is the case, the array may be allocated larger allocated structure. If this is the case, the array may be allocated larger
than its upper bound implies. */ than its upper bound implies. */
static bool bool
array_at_struct_end_p (tree ref) array_at_struct_end_p (tree ref)
{ {
tree base = get_base_address (ref); tree base = get_base_address (ref);
......
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