diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-15 05:04:50 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-15 05:04:50 +0000 |
commit | ae6346fd76494d03521bffb48234195b477d839e (patch) | |
tree | 97b92d4d577f23044cf2b84c8a604efb5dab883e /gcc/sese.c | |
parent | 328218c22e91d8cb590fdd6d2dcc4dbcd3d29a77 (diff) | |
download | gcc-ae6346fd76494d03521bffb48234195b477d839e.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167844 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sese.c')
-rw-r--r-- | gcc/sese.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/sese.c b/gcc/sese.c index 3bf6beadee5..076f07a54ae 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); |