From: Sebastian Pop Date: Fri, 31 Jul 2009 02:28:50 +0000 (+0000) Subject: tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not static anymore. X-Git-Tag: releases/gcc-4.5.0~4253 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42e6eec568abf5870e676873309f998211c648a8;p=thirdparty%2Fgcc.git tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not static anymore. 2009-07-30 Sebastian Pop * 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. From-SVN: r150289 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4fa79079b7b7..82f6a9192278 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-07-30 Sebastian Pop + + * 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 * config/mep/mep.c (mep_asm_init_sections): Add section flags and diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index bac6e594d8f0..e817ffe64c30 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -466,7 +466,7 @@ loop_phi_node_p (gimple phi) EVOLUTION_FN = {i_0, +, 2}_1. */ -static tree +tree compute_overall_effect_of_inner_loop (struct loop *loop, tree evolution_fn) { bool val = false; @@ -492,7 +492,10 @@ compute_overall_effect_of_inner_loop (struct loop *loop, tree evolution_fn) /* 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); } diff --git a/gcc/tree-scalar-evolution.h b/gcc/tree-scalar-evolution.h index 06324972ca54..5caadc570311 100644 --- a/gcc/tree-scalar-evolution.h +++ b/gcc/tree-scalar-evolution.h @@ -1,5 +1,5 @@ /* 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 This file is part of GCC. @@ -33,10 +33,10 @@ extern tree instantiate_scev (basic_block, struct loop *, tree); 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. */