diff options
author | Richard Guenther <rguenther@suse.de> | 2012-08-16 14:27:51 +0000 |
---|---|---|
committer | Richard Guenther <rguenther@suse.de> | 2012-08-16 14:27:51 +0000 |
commit | 2f2d6d55f338fc9fb785a58a77d1184feca2c826 (patch) | |
tree | 376f51f58149bf3a9c71811ae304381e607e6ff2 /gcc/tree-into-ssa.c | |
parent | 5e2f91765779d7dcc8af1107dced3627d13dc87c (diff) |
2012-08-16 Richard Guenther <rguenther@suse.de>
PR middle-end/54146
* tree-ssa-loop-niter.c (find_loop_niter_by_eval): Free the
exit vector.
* ipa-pure-const.c (analyze_function): Use FOR_EACH_LOOP_BREAK.
* cfgloop.h (FOR_EACH_LOOP_BREAK): Fix.
* tree-ssa-structalias.c (handle_lhs_call): Properly free rhsc.
* tree-into-ssa.c (get_ssa_name_ann): Allocate info only when
needed.
* tree-ssa-loop-im.c (analyze_memory_references): Adjust.
(tree_ssa_lim_finalize): Free all mem_refs.
* tree-ssa-sccvn.c (extract_and_process_scc_for_name): Free
scc when bailing out.
* modulo-sched.c (sms_schedule): Use FOR_EACH_LOOP_BREAK.
* ira-build.c (loop_with_complex_edge_p): Free loop exit vector.
* graphite-sese-to-poly.c (scop_ivs_can_be_represented): Use
FOR_EACH_LOOP_BREAK.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190445 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-into-ssa.c')
-rw-r--r-- | gcc/tree-into-ssa.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c index 073a4881a62..a3c31799d02 100644 --- a/gcc/tree-into-ssa.c +++ b/gcc/tree-into-ssa.c @@ -312,22 +312,21 @@ get_ssa_name_ann (tree name) unsigned len = VEC_length (ssa_name_info_p, info_for_ssa_name); struct ssa_name_info *info; + /* Re-allocate the vector at most once per update/into-SSA. */ if (ver >= len) - { - unsigned old_len = VEC_length (ssa_name_info_p, info_for_ssa_name); - unsigned new_len = num_ssa_names; + VEC_safe_grow_cleared (ssa_name_info_p, heap, + info_for_ssa_name, num_ssa_names); - VEC_reserve (ssa_name_info_p, heap, info_for_ssa_name, - new_len - old_len); - while (len++ < new_len) - { - struct ssa_name_info *info = XCNEW (struct ssa_name_info); - info->age = current_info_for_ssa_name_age; - VEC_quick_push (ssa_name_info_p, info_for_ssa_name, info); - } + /* But allocate infos lazily. */ + info = VEC_index (ssa_name_info_p, info_for_ssa_name, ver); + if (!info) + { + info = XCNEW (struct ssa_name_info); + info->age = current_info_for_ssa_name_age; + info->info.need_phi_state = NEED_PHI_STATE_UNKNOWN; + VEC_replace (ssa_name_info_p, info_for_ssa_name, ver, info); } - info = VEC_index (ssa_name_info_p, info_for_ssa_name, ver); if (info->age < current_info_for_ssa_name_age) { info->age = current_info_for_ssa_name_age; |