aboutsummaryrefslogtreecommitdiff
path: root/gcc/sese.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2010-12-15 05:04:50 +0000
committerSebastian Pop <spop@gcc.gnu.org>2010-12-15 05:04:50 +0000
commit05575a4695b01941551f84e718997f6803c82dbc (patch)
tree97b92d4d577f23044cf2b84c8a604efb5dab883e /gcc/sese.c
parent3e6f8b560669aa350629504f80388cc773719f13 (diff)
downloadgcc-05575a4695b01941551f84e718997f6803c82dbc.zip
gcc-05575a4695b01941551f84e718997f6803c82dbc.tar.gz
gcc-05575a4695b01941551f84e718997f6803c82dbc.tar.bz2
Fix PR46845: handle scop parameters before scev analysis.
2010-12-14 Sebastian Pop <sebastian.pop@amd.com> PR tree-optimization/46845 * sese.c (scalar_evolution_in_region): Handle scop parameters before scev analysis. * gcc.dg/graphite/id-pr46845.c: New. From-SVN: r167844
Diffstat (limited to 'gcc/sese.c')
-rw-r--r--gcc/sese.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/sese.c b/gcc/sese.c
index 3bf6bea..076f07a 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -801,14 +801,16 @@ scalar_evolution_in_region (sese region, loop_p loop, tree t)
struct loop *def_loop;
basic_block before = block_before_sese (region);
+ /* SCOP parameters. */
+ if (TREE_CODE (t) == SSA_NAME
+ && !defined_in_sese_p (t, region))
+ return t;
+
if (TREE_CODE (t) != SSA_NAME
|| loop_in_sese_p (loop, region))
return instantiate_scev (before, loop,
analyze_scalar_evolution (loop, t));
- if (!defined_in_sese_p (t, region))
- return t;
-
def = SSA_NAME_DEF_STMT (t);
def_loop = loop_containing_stmt (def);