diff options
author | Bernd Schmidt <bernds@redhat.com> | 2015-09-30 17:43:26 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2015-09-30 11:43:26 -0600 |
commit | dc0ccbb3a3e60f0423ac69d82f6cb78ff9b10800 (patch) | |
tree | 9dece98ef18534e0b8a0d3a25a64b43857c34914 /gcc/passes.c | |
parent | 0fe78d19df60f6131586feb556c1e92bb3c03961 (diff) | |
download | gcc-dc0ccbb3a3e60f0423ac69d82f6cb78ff9b10800.zip gcc-dc0ccbb3a3e60f0423ac69d82f6cb78ff9b10800.tar.gz gcc-dc0ccbb3a3e60f0423ac69d82f6cb78ff9b10800.tar.bz2 |
[PATCH] Update SSA_NAME manager to use two lists
* gimple-ssa.h (gimple_df): Add free_ssanames_queue field.
* passes.c: Include tree-ssanames.h.
(execute_function_todo): Flush the pending free SSA_NAMEs after
eliminating unreachable basic blocks.
* tree-ssanames.c (FREE_SSANAMES_QUEUE): new.
(init_ssanames): Initialize FREE_SSANAMES_QUEUE.
(fini_ssanames): Finalize FREE_SSANAMES_QUEUE.
(flush_ssanames_freelist): New function.
(release_ssaname_fn): Put released names on the queue.
(pass_release_ssa_names::execute): Call flush_ssanames_freelist.
* tree-ssanames.h (flush_ssanames_freelist): Declare.
From-SVN: r228302
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index d06a293..5b41102 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -84,6 +84,7 @@ along with GCC; see the file COPYING3. If not see #include "cfgrtl.h" #include "tree-ssa-live.h" /* For remove_unused_locals. */ #include "tree-cfgcleanup.h" +#include "tree-ssanames.h" using namespace gcc; @@ -1913,6 +1914,14 @@ execute_function_todo (function *fn, void *data) { cleanup_tree_cfg (); + /* Once unreachable nodes have been removed from the CFG, + there can't be any lingering references to released + SSA_NAMES (because there is no more unreachable code). + + Thus, now is the time to flush the SSA_NAMEs freelist. */ + if (fn->gimple_df) + flush_ssaname_freelist (); + /* When cleanup_tree_cfg merges consecutive blocks, it may perform some simplistic propagation when removing single valued PHI nodes. This propagation may, in turn, cause the |