diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2010-12-15 05:04:50 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2010-12-15 05:04:50 +0000 |
commit | 05575a4695b01941551f84e718997f6803c82dbc (patch) | |
tree | 97b92d4d577f23044cf2b84c8a604efb5dab883e /gcc/sese.c | |
parent | 3e6f8b560669aa350629504f80388cc773719f13 (diff) | |
download | gcc-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.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); |