aboutsummaryrefslogtreecommitdiff
path: root/gcc/symbol-summary.h
diff options
context:
space:
mode:
authorGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-22 17:43:43 -0300
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-22 17:43:43 -0300
commita926878ddbd5a98b272c22171ce58663fc04c3e0 (patch)
tree86af256e5d9a9c06263c00adc90e5fe348008c43 /gcc/symbol-summary.h
parent542730f087133690b47e036dfd43eb0db8a650ce (diff)
parent07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff)
downloadgcc-devel/autopar_devel.zip
gcc-devel/autopar_devel.tar.gz
gcc-devel/autopar_devel.tar.bz2
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'gcc/symbol-summary.h')
-rw-r--r--gcc/symbol-summary.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/symbol-summary.h b/gcc/symbol-summary.h
index a38eb1d..fa1df5c 100644
--- a/gcc/symbol-summary.h
+++ b/gcc/symbol-summary.h
@@ -354,8 +354,11 @@ public:
id = this->m_symtab->assign_summary_id (node);
if ((unsigned int)id >= m_vector->length ())
- vec_safe_grow_cleared (m_vector,
- this->m_symtab->cgraph_max_summary_id);
+ {
+ int newlen = this->m_symtab->cgraph_max_summary_id;
+ vec_safe_reserve (m_vector, newlen - m_vector->length ());
+ m_vector->quick_grow_cleared (newlen);
+ }
if ((*m_vector)[id] == NULL)
(*m_vector)[id] = this->allocate_new ();
@@ -812,7 +815,11 @@ public:
id = this->m_symtab->assign_summary_id (edge);
if ((unsigned)id >= m_vector->length ())
- vec_safe_grow_cleared (m_vector, this->m_symtab->edges_max_summary_id);
+ {
+ int newlen = this->m_symtab->edges_max_summary_id;
+ m_vector->reserve (newlen - m_vector->length ());
+ m_vector->quick_grow_cleared (newlen);
+ }
if ((*m_vector)[id] == NULL)
(*m_vector)[id] = this->allocate_new ();