summaryrefslogtreecommitdiff
path: root/gcc/ipa-icf.c
diff options
context:
space:
mode:
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-19 01:44:42 +0000
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-19 01:44:42 +0000
commit8ed0255a2041a6495216424080f2c7ecc1dfcdc4 (patch)
tree739322f85a253d19039bbaaa8dfde298b605c5cd /gcc/ipa-icf.c
parente228ced75a3fb32c3c515e2e7ff59ebf7e6ac2a1 (diff)
downloadgcc-8ed0255a2041a6495216424080f2c7ecc1dfcdc4.tar.gz
sem_function::bb_dict_test should take a vec<int> *
bb_dict_test () ment to operate on the callers vector, not a copy of it. gcc/ChangeLog: 2015-02-18 Trevor Saunders <tsaunders@mozilla.com> * ipa-icf.c (sem_function::equals_private): Adjust. (sem_function::bb_dict_test): Take a vec<int> * instead of auto_vec<int>. * ipa-icf.h (bb_dict_test): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220806 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-icf.c')
-rw-r--r--gcc/ipa-icf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 692946ae7b1..494fdcf08f5 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -563,10 +563,10 @@ sem_function::equals_private (sem_item *item,
if (e1->flags != e2->flags)
return return_false_with_msg ("flags comparison returns false");
- if (!bb_dict_test (bb_dict, e1->src->index, e2->src->index))
+ if (!bb_dict_test (&bb_dict, e1->src->index, e2->src->index))
return return_false_with_msg ("edge comparison returns false");
- if (!bb_dict_test (bb_dict, e1->dest->index, e2->dest->index))
+ if (!bb_dict_test (&bb_dict, e1->dest->index, e2->dest->index))
return return_false_with_msg ("BB comparison returns false");
if (!m_checker->compare_edge (e1, e2))
@@ -1053,21 +1053,21 @@ sem_function::icf_handled_component_p (tree t)
corresponds to TARGET. */
bool
-sem_function::bb_dict_test (auto_vec<int> bb_dict, int source, int target)
+sem_function::bb_dict_test (vec<int> *bb_dict, int source, int target)
{
source++;
target++;
- if (bb_dict.length () <= (unsigned)source)
- bb_dict.safe_grow_cleared (source + 1);
+ if (bb_dict->length () <= (unsigned)source)
+ bb_dict->safe_grow_cleared (source + 1);
- if (bb_dict[source] == 0)
+ if ((*bb_dict)[source] == 0)
{
- bb_dict[source] = target;
+ (*bb_dict)[source] = target;
return true;
}
else
- return bb_dict[source] == target;
+ return (*bb_dict)[source] == target;
}
/* Iterates all tree types in T1 and T2 and returns true if all types