Commit 3f227a8c by Jan Sjodin Committed by Sebastian Pop

tree-scalar-evolution.c: Document instantiate_scev.

2008-05-09  Jan Sjodin  <jan.sjodin@amd.com>
	    Sebastian Pop  <sebastian.pop@amd.com>

	* tree-scalar-evolution.c: Document instantiate_scev.
	(instantiate_parameters_1): Renamed instantiate_scev_1.
	Don't use the same loop for instantiation_loop and evolution_loop.
	(instantiate_scev): New.
	(instantiate_parameters): Moved...
	(resolve_mixers): Update call to instantiate_scev_1 to pass the
	same loop twice.  Maintains the semantics for this function.
	* tree-scalar-evolution.h (instantiate_scev): Declare.
	(instantiate_parameters): ...here.  Now static inline.
	* tree-data-ref.c (dr_analyze_indices): Call instantiate_scev
	instead of resolve_mixers.


Co-Authored-By: Sebastian Pop <sebastian.pop@amd.com>

From-SVN: r135116
parent a3e19be6
2008-05-09 Jan Sjodin <jan.sjodin@amd.com>
Sebastian Pop <sebastian.pop@amd.com>
* tree-scalar-evolution.c: Document instantiate_scev.
(instantiate_parameters_1): Renamed instantiate_scev_1.
Don't use the same loop for instantiation_loop and evolution_loop.
(instantiate_scev): New.
(instantiate_parameters): Moved...
(resolve_mixers): Update call to instantiate_scev_1 to pass the
same loop twice. Maintains the semantics for this function.
* tree-scalar-evolution.h (instantiate_scev): Declare.
(instantiate_parameters): ...here. Now static inline.
* tree-data-ref.c (dr_analyze_indices): Call instantiate_scev
instead of resolve_mixers.
2008-05-09 Maxim Kuvyrkov <maxim@codesourcery.com>
* rtl-factoring.c (collect_pattern_seqs): Fix typo.
......
2008-01-08 Jan Sjodin <jan.sjodin@amd.com>
Sebastian Pop <sebastian.pop@amd.com>
* gcc.dg/tree-ssa/data-dep-1.c: New.
2008-05-08 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/20040911-1.c: Adjust.
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-loop-linear -fdump-tree-ltrans-all" } */
int foo (int n, int m)
{
int a[10000][10000];
int i, j, k;
for(k = 0; k < 1234; k++)
for(j = 0; j < 5; j++)
for(i = 0; i < 67; i++)
{
a[j+i-(-m+n+3)][i-k+4] = a[k+j][i];
}
return a[0][0];
}
/* For the data dependence analysis of the outermost loop, the
evolution of "k+j" should be instantiated in the outermost loop "k"
and the evolution should be taken in the innermost loop "i". The
pattern below ensures that the evolution is not computed in the
outermost "k" loop: the 4 comes from the instantiation of the
number of iterations of loop "j". */
/* { dg-final { scan-tree-dump-times "4, \\+, 1" 0 "ltrans" } } */
/* { dg-final { cleanup-tree-dump "ltrans" } } */
......@@ -741,7 +741,7 @@ dr_analyze_indices (struct data_reference *dr, struct loop *nest)
{
op = TREE_OPERAND (aref, 1);
access_fn = analyze_scalar_evolution (loop, op);
access_fn = resolve_mixers (nest, access_fn);
access_fn = instantiate_scev (nest, loop, access_fn);
VEC_safe_push (tree, heap, access_fns, access_fn);
TREE_OPERAND (aref, 1) = build_int_cst (TREE_TYPE (op), 0);
......
......@@ -30,7 +30,7 @@ extern void scev_reset (void);
extern void scev_reset_except_niters (void);
extern void scev_finalize (void);
extern tree analyze_scalar_evolution (struct loop *, tree);
extern tree instantiate_parameters (struct loop *, tree);
extern tree instantiate_scev (struct loop *, struct loop *, tree);
extern tree resolve_mixers (struct loop *, tree);
extern void gather_stats_on_scev_database (void);
extern void scev_analysis (void);
......@@ -38,6 +38,16 @@ unsigned int scev_const_prop (void);
extern bool simple_iv (struct loop *, tree, tree, affine_iv *, bool);
/* Analyze all the parameters of the chrec that were left under a
symbolic form. LOOP is the loop in which symbolic names have to
be analyzed and instantiated. */
static inline tree
instantiate_parameters (struct loop *loop, tree chrec)
{
return instantiate_scev (loop, loop, chrec);
}
/* Returns the loop of the polynomial chrec CHREC. */
static inline struct loop *
......
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