ipa-devirt.c: Include gimple-pretty-print.h
commit7d0aa05b9ead1b114958d8230377c2c25ef54876
authorJan Hubicka <hubicka@ucw.cz>
Thu, 7 Aug 2014 20:58:17 +0000 (7 22:58 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 7 Aug 2014 20:58:17 +0000 (7 20:58 +0000)
tree3358c76f8c1af0e9fe0b8b19fef9b3fe6f0935ff
parent9f25a338f91f9c448d57681b6d17a91233222d43
ipa-devirt.c: Include gimple-pretty-print.h

* ipa-devirt.c: Include gimple-pretty-print.h
(referenced_from_vtable_p): Exclude DECL_EXTERNAL from
further tests.
(decl_maybe_in_construction_p): Fix conditional on cdtor check
(get_polymorphic_call_info): Fix return value
(type_change_info): New sturcture based on ipa-prop
variant.
(noncall_stmt_may_be_vtbl_ptr_store): New predicate
based on ipa-prop variant.
(extr_type_from_vtbl_ptr_store): New function
based on ipa-prop variant.
(record_known_type): New function.
(check_stmt_for_type_change): New function.
(get_dynamic_type): New function.
* ipa-prop.c (ipa_analyze_call_uses): Use get_dynamic_type.
* tree-ssa-pre.c: ipa-utils.h
(eliminate_dom_walker::before_dom_children): Use ipa-devirt
machinery; sanity check with ipa-prop devirtualization.
* trans-mem.c (ipa_tm_insert_gettmclone_call): Clear
polymorphic flag.

* g++.dg/ipa/devirt-35.C: New testcase.
* g++.dg/ipa/devirt-36.C: New testcase.

From-SVN: r213739
gcc/ChangeLog
gcc/ipa-devirt.c
gcc/ipa-prop.c
gcc/ipa-utils.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ipa/devirt-35.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ipa/devirt-36.C [new file with mode: 0644]
gcc/trans-mem.c
gcc/tree-ssa-pre.c