Commit 6ff65dd7 by Martin Jambor Committed by Martin Jambor

cgraph.h (clear_outer_type): Make public.

2014-11-14  Martin Jambor  <mjambor@suse.cz>

	* cgraph.h (clear_outer_type): Make public.  Fix comment.
	* ipa-devirt.c (possible_polymorphic_call_targets): Use
	clear_outer_type when resetting the context.

From-SVN: r217529
parent 453f025a
2014-11-14 Martin Jambor <mjambor@suse.cz>
* cgraph.h (clear_outer_type): Make public. Fix comment.
* ipa-devirt.c (possible_polymorphic_call_targets): Use
clear_outer_type when resetting the context.
2014-11-13 Dominique Dhumieres <dominiq@lps.ens.fr> 2014-11-13 Dominique Dhumieres <dominiq@lps.ens.fr>
PR bootstrap/63853 PR bootstrap/63853
...@@ -1352,6 +1352,10 @@ public: ...@@ -1352,6 +1352,10 @@ public:
/* Make context non-speculative. */ /* Make context non-speculative. */
void clear_speculation (); void clear_speculation ();
/* Produce context specifying all derrived types of OTR_TYPE. If OTR_TYPE is
NULL, the context is set to dummy "I know nothing" setting. */
void clear_outer_type (tree otr_type = NULL);
/* Walk container types and modify context to point to actual class /* Walk container types and modify context to point to actual class
containing OTR_TYPE (if non-NULL) as base class. containing OTR_TYPE (if non-NULL) as base class.
Return true if resulting context is valid. Return true if resulting context is valid.
...@@ -1392,7 +1396,6 @@ private: ...@@ -1392,7 +1396,6 @@ private:
bool combine_speculation_with (tree, HOST_WIDE_INT, bool, tree); bool combine_speculation_with (tree, HOST_WIDE_INT, bool, tree);
void set_by_decl (tree, HOST_WIDE_INT); void set_by_decl (tree, HOST_WIDE_INT);
bool set_by_invariant (tree, tree, HOST_WIDE_INT); bool set_by_invariant (tree, tree, HOST_WIDE_INT);
void clear_outer_type (tree otr_type = NULL);
bool speculation_consistent_p (tree, HOST_WIDE_INT, bool, tree); bool speculation_consistent_p (tree, HOST_WIDE_INT, bool, tree);
void make_speculative (tree otr_type = NULL); void make_speculative (tree otr_type = NULL);
}; };
...@@ -2748,9 +2751,8 @@ ipa_polymorphic_call_context::clear_speculation () ...@@ -2748,9 +2751,8 @@ ipa_polymorphic_call_context::clear_speculation ()
speculative_maybe_derived_type = false; speculative_maybe_derived_type = false;
} }
/* Produce context specifying all derrived types of OTR_TYPE. /* Produce context specifying all derrived types of OTR_TYPE. If OTR_TYPE is
If OTR_TYPE is NULL or type of the OBJ_TYPE_REF, the context is set NULL, the context is set to dummy "I know nothing" setting. */
to dummy "I know nothing" setting. */
inline void inline void
ipa_polymorphic_call_context::clear_outer_type (tree otr_type) ipa_polymorphic_call_context::clear_outer_type (tree otr_type)
......
...@@ -2281,10 +2281,7 @@ possible_polymorphic_call_targets (tree otr_type, ...@@ -2281,10 +2281,7 @@ possible_polymorphic_call_targets (tree otr_type,
/* Without outer type, we have no use for offset. Just do the /* Without outer type, we have no use for offset. Just do the
basic search from innter type */ basic search from innter type */
if (!context.outer_type) if (!context.outer_type)
{ context.clear_outer_type (otr_type);
context.outer_type = otr_type;
context.offset = 0;
}
/* We need to update our hiearchy if the type does not exist. */ /* We need to update our hiearchy if the type does not exist. */
outer_type = get_odr_type (context.outer_type, true); outer_type = get_odr_type (context.outer_type, true);
/* If the type is complete, there are no derivations. */ /* If the type is complete, there are no derivations. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment