aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadbackward.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2016-01-21 15:21:55 -0700
committerJeff Law <law@gcc.gnu.org>2016-01-21 15:21:55 -0700
commit7f370a2b0c2e613f1dcd47909f82e32033ae2381 (patch)
treee838fb5644b281dd414a57e44417ba4aa89d2677 /gcc/tree-ssa-threadbackward.c
parent2423a75aed79a349c3469f936fbc4ad30bf9b464 (diff)
downloadgcc-7f370a2b0c2e613f1dcd47909f82e32033ae2381.zip
gcc-7f370a2b0c2e613f1dcd47909f82e32033ae2381.tar.gz
gcc-7f370a2b0c2e613f1dcd47909f82e32033ae2381.tar.bz2
[PATCH] [PR tree-optimization/69347] Fix memory consumption in threader & minor speed improvement
PR middle-end/69347 * tree-ssa-dom.c (dom_opt_dom_walker::thread_across_edge): Avoid useless call to record_temporary_equivalences. * tree-ssa-threadbackward.c (find_jump_threads_backwards): Just allocate 10 slots in the bb_path vector and let it grow as needed. (fsm_find_control_statement_thread_paths): Similarly for the next_path vector. From-SVN: r232711
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
-rw-r--r--gcc/tree-ssa-threadbackward.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c
index 8d8aa30..8be57a0 100644
--- a/gcc/tree-ssa-threadbackward.c
+++ b/gcc/tree-ssa-threadbackward.c
@@ -142,7 +142,7 @@ fsm_find_control_statement_thread_paths (tree name,
int e_count = 0;
edge_iterator ei;
vec<basic_block, va_gc> *next_path;
- vec_alloc (next_path, n_basic_blocks_for_fn (cfun));
+ vec_alloc (next_path, 10);
/* When VAR_BB == LAST_BB_IN_PATH, then the first block in the path
will already be in VISITED_BBS. When they are not equal, then we
@@ -379,7 +379,7 @@ find_jump_threads_backwards (edge e)
return;
vec<basic_block, va_gc> *bb_path;
- vec_alloc (bb_path, n_basic_blocks_for_fn (cfun));
+ vec_alloc (bb_path, 10);
vec_safe_push (bb_path, e->dest);
hash_set<basic_block> *visited_bbs = new hash_set<basic_block>;