diff options
Diffstat (limited to 'gcc/cfgexpand.cc')
-rw-r--r-- | gcc/cfgexpand.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc index 2b27076..277ef65 100644 --- a/gcc/cfgexpand.cc +++ b/gcc/cfgexpand.cc @@ -766,7 +766,12 @@ vars_ssa_cache::operator() (tree name) /* If the cache exists for the use, don't try to recreate it. */ if (exists (use)) - continue; + { + /* Update the cache here, this can reduce the number of + times through the update loop below. */ + update (old_name, use); + continue; + } /* Create the cache bitmap for the use and also so we don't go into an infinite loop for some phi nodes with loops. */ @@ -804,9 +809,11 @@ vars_ssa_cache::operator() (tree name) bool changed; do { changed = false; - for (auto &e : update_cache_list) + unsigned int i; + std::pair<tree,tree> *e; + FOR_EACH_VEC_ELT_REVERSE (update_cache_list, i, e) { - if (update (e.second, e.first)) + if (update (e->second, e->first)) changed = true; } } while (changed); |