diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-11 20:29:25 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-11 20:29:25 +0000 |
commit | 52f57b4eef7c91379c5262af3f946284997b52e8 (patch) | |
tree | e53c7f8f170d14a40b3ad78f03f865f6fa651d8f /gcc/tree-scalar-evolution.c | |
parent | c07c57fb13e8f87f934896d4057b4c8ebea6fd48 (diff) | |
download | gcc-52f57b4eef7c91379c5262af3f946284997b52e8.tar.gz |
Do not instantiate default definitions in instantiate_scev_name.
2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
* tree-scalar-evolution.c (instantiate_scev_name): Do not
instantiate default definitions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163155 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r-- | gcc/tree-scalar-evolution.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index 0e372567c89..edf8b3ef658 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -2179,11 +2179,15 @@ instantiate_scev_name (basic_block instantiate_below, result again. */ res = analyze_scalar_evolution (def_loop, chrec); - /* Don't instantiate loop-closed-ssa phi nodes. */ + /* Don't instantiate default definitions. */ if (TREE_CODE (res) == SSA_NAME - && (loop_containing_stmt (SSA_NAME_DEF_STMT (res)) == NULL - || (loop_depth (loop_containing_stmt (SSA_NAME_DEF_STMT (res))) - > loop_depth (def_loop)))) + && SSA_NAME_IS_DEFAULT_DEF (res)) + ; + + /* Don't instantiate loop-closed-ssa phi nodes. */ + else if (TREE_CODE (res) == SSA_NAME + && loop_depth (loop_containing_stmt (SSA_NAME_DEF_STMT (res))) + > loop_depth (def_loop)) { if (res == chrec) res = loop_closed_phi_def (chrec); @@ -2213,7 +2217,6 @@ instantiate_scev_name (basic_block instantiate_below, /* Store the correct value to the cache. */ set_instantiated_value (cache, instantiate_below, chrec, res); return res; - } /* Analyze all the parameters of the chrec, between INSTANTIATE_BELOW |