]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not static anymore.
authorSebastian Pop <sebastian.pop@amd.com>
Fri, 31 Jul 2009 02:28:50 +0000 (02:28 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Fri, 31 Jul 2009 02:28:50 +0000 (02:28 +0000)
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.

From-SVN: r150289

gcc/ChangeLog
gcc/tree-scalar-evolution.c
gcc/tree-scalar-evolution.h

index 4fa79079b7b7dd855cf21fbc52bb6440efbbf30c..82f6a919227836fb4e713c166ef26ec4882ec439 100644 (file)
@@ -1,3 +1,11 @@
+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
index bac6e594d8f02ba32d961906d48c6bc90a03015c..e817ffe64c304da838e761f65dd8967ddc27c226 100644 (file)
@@ -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);
            }
index 06324972ca541412092eb5d508a54bfa990e22b7..5caadc57031135959fa2a80e4eecfc690dd2d4ca 100644 (file)
@@ -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 <s.pop@laposte.net>
 
 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.  */