+2009-07-30 Sebastian Pop <sebastian.pop@amd.com>
+
+ * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
+ static anymore. Instantiate the symbols that may have been introduced
+ by chrec_apply.
+ * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
+ Declared.
+
2009-07-30 DJ Delorie <dj@redhat.com>
* config/mep/mep.c (mep_asm_init_sections): Add section flags and
EVOLUTION_FN = {i_0, +, 2}_1.
*/
-static tree
+tree
compute_overall_effect_of_inner_loop (struct loop *loop, tree evolution_fn)
{
bool val = false;
/* evolution_fn is the evolution function in LOOP. Get
its value in the nb_iter-th iteration. */
res = chrec_apply (inner_loop->num, evolution_fn, nb_iter);
-
+
+ if (chrec_contains_symbols_defined_in_loop (res, loop->num))
+ res = instantiate_parameters (loop, res);
+
/* Continue the computation until ending on a parent of LOOP. */
return compute_overall_effect_of_inner_loop (loop, res);
}
/* Scalar evolution detector.
- Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Sebastian Pop <s.pop@laposte.net>
This file is part of GCC.
extern tree resolve_mixers (struct loop *, tree);
extern void gather_stats_on_scev_database (void);
extern void scev_analysis (void);
-unsigned int scev_const_prop (void);
-
-bool expression_expensive_p (tree);
+extern unsigned int scev_const_prop (void);
+extern bool expression_expensive_p (tree);
extern bool simple_iv (struct loop *, struct loop *, tree, affine_iv *, bool);
+extern tree compute_overall_effect_of_inner_loop (struct loop *, tree);
/* Returns the basic block preceding LOOP or ENTRY_BLOCK_PTR when the
loop is function's body. */