diff options
author | Dale Johannesen <dalej@apple.com> | 2005-02-26 22:27:27 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2005-02-26 22:27:27 +0000 |
commit | a748c6a071044f40129688a9daa4a920e49ca46f (patch) | |
tree | 26765cb4b3726d311c27d27e7106e17e3d0d786d | |
parent | 8f5ff33a3b248bcaa5b977b2e337cbb24e9c8825 (diff) |
2005-02-26 Dale Johanensen <dalej@apple.com>
Radar 3988125
PR 19360 (from mainline)
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Clear SSA_NAME_VALUE
at the end of the main DOM loop rather than just before DOM exits.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/apple-ppc-branch@95596 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.apple-ppc | 7 | ||||
-rw-r--r-- | gcc/tree-ssa-dom.c | 39 |
2 files changed, 28 insertions, 18 deletions
diff --git a/gcc/ChangeLog.apple-ppc b/gcc/ChangeLog.apple-ppc index ee69578aa28..ecf8ca6d120 100644 --- a/gcc/ChangeLog.apple-ppc +++ b/gcc/ChangeLog.apple-ppc @@ -1,3 +1,10 @@ +2005-02-26 Dale Johanensen <dalej@apple.com> + + Radar 3988125 + PR 19360 (from mainline) + * tree-ssa-dom.c (tree_ssa_dominator_optimize): Clear SSA_NAME_VALUE + at the end of the main DOM loop rather than just before DOM exits. + 2005-02-25 Devang Patel <dpatel@apple.com> Radar 4023104 diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 0e11908e919..782be9f67af 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -395,6 +395,27 @@ tree_ssa_dominator_optimize (void) for (i = 0; i < num_referenced_vars; i++) var_ann (referenced_var (i))->current_def = NULL; + + /* Finally, remove everything except invariants in SSA_NAME_VALUE. + + This must be done before we iterate as we might have a + reference to an SSA_NAME which was removed by the call to + rewrite_ssa_into_ssa. + + Long term we will be able to let everything in SSA_NAME_VALUE + persist. However, for now, we know this is the safe thing to do. */ + for (i = 0; i < num_ssa_names; i++) + { + tree name = ssa_name (i); + tree value; + + if (!name) + continue; + + value = SSA_NAME_VALUE (name); + if (value && !is_gimple_min_invariant (value)) + SSA_NAME_VALUE (name) = NULL; + } } while (cfg_altered); @@ -419,24 +440,6 @@ tree_ssa_dominator_optimize (void) /* Free nonzero_vars. */ BITMAP_XFREE (nonzero_vars); BITMAP_XFREE (need_eh_cleanup); - - /* Finally, remove everything except invariants in SSA_NAME_VALUE. - - Long term we will be able to let everything in SSA_NAME_VALUE - persist. However, for now, we know this is the safe thing to - do. */ - for (i = 0; i < num_ssa_names; i++) - { - tree name = ssa_name (i); - tree value; - - if (!name) - continue; - - value = SSA_NAME_VALUE (name); - if (value && !is_gimple_min_invariant (value)) - SSA_NAME_VALUE (name) = NULL; - } } static bool |