mirror of git://gcc.gnu.org/git/gcc.git
* ipa-polymorphic-call.c
(ipa_polymorphic_call_context::get_dynamic_type): Short circuit the case when call target is already known. From-SVN: r223733
This commit is contained in:
parent
c6b8c3adf9
commit
6acd8c92ef
|
|
@ -1,3 +1,9 @@
|
|||
2015-05-26 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
* ipa-polymorphic-call.c
|
||||
(ipa_polymorphic_call_context::get_dynamic_type): Short circuit the
|
||||
case when call target is already known.
|
||||
|
||||
2015-05-26 Oleg Endo <olegendo@gcc.gnu.org>
|
||||
|
||||
PR target/65979
|
||||
|
|
|
|||
|
|
@ -1561,6 +1561,11 @@ ipa_polymorphic_call_context::get_dynamic_type (tree instance,
|
|||
ref = OBJ_TYPE_REF_EXPR (ref);
|
||||
ref = walk_ssa_copies (ref);
|
||||
|
||||
/* If call target is already known, no need to do the expensive
|
||||
memory walk. */
|
||||
if (is_gimple_min_invariant (ref))
|
||||
return false;
|
||||
|
||||
/* Check if definition looks like vtable lookup. */
|
||||
if (TREE_CODE (ref) == SSA_NAME
|
||||
&& !SSA_NAME_IS_DEFAULT_DEF (ref)
|
||||
|
|
|
|||
Loading…
Reference in New Issue