diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-13 06:30:04 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-13 06:30:04 +0000 |
commit | 9f27b0caacbfc21963098a6d8e305c148ac8661a (patch) | |
tree | 490246165d88266159fba519998ff7dc9711af32 /gcc/ipa-icf-gimple.h | |
parent | 435f2b440e43be603a3ef9433d94af5fb67926ac (diff) | |
download | gcc-9f27b0caacbfc21963098a6d8e305c148ac8661a.tar.gz |
* ipa-icf.c (sem_function::equals_wpa): Match CXX_CONSTRUCTOR_P
and CXX_DESTURCTOR_P. For consutrctors match ODR type of class they
are building; for methods check ODR type of class they belong to if
they may lead to a polymorphic call.
(sem_function::compare_polymorphic_p): Be bit smarter about testing
when function may lead to a polymorphic call.
(sem_function::compare_type_list): Remove.
(sem_variable::equals): Update use of compatible_types_p.
(sem_variable::parse_tree_refs): Remove.
(sem_item_optimizer::filter_removed_items): Do not filter out CXX
cdtor.
* ipa-icf-gimple.c (func_checker::compare_decl): Do polymorphic
matching here.
(func_checker::compatible_polymorphic_types_p): Break out from ...
(unc_checker::compatible_types_p): ... here.
* ipa-icf-gimple.h (func_checker::compatible_polymorphic_types_p):
Declare.
(unc_checker::compatible_types_p): Update.
* ipa-icf.h (compare_type_list, parse_tree_refs, compare_sections):
Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221406 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-icf-gimple.h')
-rw-r--r-- | gcc/ipa-icf-gimple.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ipa-icf-gimple.h b/gcc/ipa-icf-gimple.h index a52f8c33c9a..53a1bfe3c14 100644 --- a/gcc/ipa-icf-gimple.h +++ b/gcc/ipa-icf-gimple.h @@ -226,12 +226,16 @@ public: /* Verifies that trees T1 and T2 do correspond. */ bool compare_variable_decl (tree t1, tree t2); + /* Return true if types are compatible for polymorphic call analysis. + COMPARE_PTR indicates if polymorphic type comparsion should be + done for pointers, too. */ + static bool compatible_polymorphic_types_p (tree t1, tree t2, + bool compare_ptr); + /* Return true if types are compatible from perspective of ICF. FIRST_ARGUMENT indicates if the comparison is called for first parameter of a function. */ - static bool compatible_types_p (tree t1, tree t2, - bool compare_polymorphic = true, - bool first_argument = false); + static bool compatible_types_p (tree t1, tree t2); private: |