diff options
author | Jan Hubicka <jh@suse.cz> | 2019-11-20 15:10:41 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-11-20 14:10:41 +0000 |
commit | 17b95f0ef07b1ae6d380fa1817922b2079e84ac7 (patch) | |
tree | b032747e40691e526c69b85646e4ae75c87efc57 | |
parent | bcb4b4b4baad38d0a9ac353822506fa1d7fb6b25 (diff) | |
download | gcc-17b95f0ef07b1ae6d380fa1817922b2079e84ac7.zip gcc-17b95f0ef07b1ae6d380fa1817922b2079e84ac7.tar.gz gcc-17b95f0ef07b1ae6d380fa1817922b2079e84ac7.tar.bz2 |
lto-streamer-out.c (DFS::sccstack): Turn into auto-vec.
* lto-streamer-out.c (DFS::sccstack): Turn into auto-vec.
Preallocate for 32 entries.
(DFS::worklist): Likewise.
(DFS::DFS): Do not initialize sccstack and worklist.
(DFS::~DFS): Do not release sccstack.
From-SVN: r278498
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/lto-streamer-out.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dc377af..c8f1928 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-11-20 Jan Hubicka <jh@suse.cz> + + * lto-streamer-out.c (DFS::sccstack): Turn into auto-vec. + Preallocate for 32 entries. + (DFS::worklist): Likewise. + (DFS::DFS): Do not initialize sccstack and worklist. + (DFS::~DFS): Do not release sccstack. + 2019-11-20 Segher Boessenkool <segher@kernel.crashing.org> PR target/92573 diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index cf45cc3..b32f014 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -514,7 +514,7 @@ public: tree t; hashval_t hash; }; - vec<scc_entry> sccstack; + auto_vec<scc_entry,32> sccstack; private: struct sccs @@ -544,7 +544,7 @@ private: bool ref_p, bool this_ref_p); hash_map<tree, sccs *> sccstate; - vec<worklist> worklist_vec; + auto_vec<worklist, 32> worklist_vec; struct obstack sccstate_obstack; }; @@ -558,9 +558,7 @@ DFS::DFS (struct output_block *ob, tree expr, bool ref_p, bool this_ref_p, bool single_p) { unsigned int next_dfs_num = 1; - sccstack.create (0); gcc_obstack_init (&sccstate_obstack); - worklist_vec = vNULL; DFS_write_tree (ob, NULL, expr, ref_p, this_ref_p); while (!worklist_vec.is_empty ()) { @@ -735,12 +733,10 @@ DFS::DFS (struct output_block *ob, tree expr, bool ref_p, bool this_ref_p, from_state->low = MIN (cstate->dfsnum, from_state->low); worklist_vec.pop (); } - worklist_vec.release (); } DFS::~DFS () { - sccstack.release (); obstack_free (&sccstate_obstack, NULL); } |