Commit 2f28755f by Jan Hubicka Committed by Jan Hubicka

ipa-devirt.c (polymorphic_call_target_d): Add SPECULATIVE; reorder for better storage.


	* ipa-devirt.c (polymorphic_call_target_d): Add SPECULATIVE; reorder
	for better storage.
	(polymorphic_call_target_hasher::hash): Hash SPECULATIVE.
	(possible_polymorphic_call_targets): Instead of computing both
	speculative and non-speculative answers, do just one at a time.
	Replace NONSPECULATIVE_TARGETSP parameter with SPECULATIVE flag.
	(dump_targets): Break out from ...
	(dump_possible_polymorphic_call_targets): ... here; dump both speculative
	and non-speculative lists.
	(ipa_devirt): Update for new possible_polymorphic_call_targets API.
	* ipa-utils.h (possible_polymorphic_call_targets): Update.

	* testsuite/g++.dg/ipa/devirt-34.C: Update template.

From-SVN: r215614
parent 0be35aa0
2014-09-25 Jan Hubicka <hubicka@ucw.cz>
* ipa-devirt.c (polymorphic_call_target_d): Add SPECULATIVE; reorder
for better storage.
(polymorphic_call_target_hasher::hash): Hash SPECULATIVE.
(possible_polymorphic_call_targets): Instead of computing both
speculative and non-speculative answers, do just one at a time.
Replace NONSPECULATIVE_TARGETSP parameter with SPECULATIVE flag.
(dump_targets): Break out from ...
(dump_possible_polymorphic_call_targets): ... here; dump both speculative
and non-speculative lists.
(ipa_devirt): Update for new possible_polymorphic_call_targets API.
* ipa-utils.h (possible_polymorphic_call_targets): Update.
2014-09-25 Uros Bizjak <ubizjak@gmail.com> 2014-09-25 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/63348 PR rtl-optimization/63348
...@@ -62,7 +62,7 @@ possible_polymorphic_call_targets (tree, HOST_WIDE_INT, ...@@ -62,7 +62,7 @@ possible_polymorphic_call_targets (tree, HOST_WIDE_INT,
ipa_polymorphic_call_context, ipa_polymorphic_call_context,
bool *copletep = NULL, bool *copletep = NULL,
void **cache_token = NULL, void **cache_token = NULL,
int *nonconstruction_targets = NULL); bool speuclative = false);
odr_type get_odr_type (tree, bool insert = false); odr_type get_odr_type (tree, bool insert = false);
bool possible_polymorphic_call_target_p (tree ref, gimple stmt, struct cgraph_node *n); bool possible_polymorphic_call_target_p (tree ref, gimple stmt, struct cgraph_node *n);
void dump_possible_polymorphic_call_targets (FILE *, tree, HOST_WIDE_INT, void dump_possible_polymorphic_call_targets (FILE *, tree, HOST_WIDE_INT,
...@@ -92,7 +92,7 @@ inline vec <cgraph_node *> ...@@ -92,7 +92,7 @@ inline vec <cgraph_node *>
possible_polymorphic_call_targets (struct cgraph_edge *e, possible_polymorphic_call_targets (struct cgraph_edge *e,
bool *completep = NULL, bool *completep = NULL,
void **cache_token = NULL, void **cache_token = NULL,
int *nonconstruction_targets = NULL) bool speculative = false)
{ {
ipa_polymorphic_call_context context(e); ipa_polymorphic_call_context context(e);
...@@ -100,7 +100,7 @@ possible_polymorphic_call_targets (struct cgraph_edge *e, ...@@ -100,7 +100,7 @@ possible_polymorphic_call_targets (struct cgraph_edge *e,
e->indirect_info->otr_token, e->indirect_info->otr_token,
context, context,
completep, cache_token, completep, cache_token,
nonconstruction_targets); speculative);
} }
/* Same as above but taking OBJ_TYPE_REF as an parameter. */ /* Same as above but taking OBJ_TYPE_REF as an parameter. */
......
2014-09-25 Jan Hubicka <hubicka@ucw.cz>
* testsuite/g++.dg/ipa/devirt-34.C: Update template.
2014-09-25 James Greenhalgh <james.greenhalgh@arm.com> 2014-09-25 James Greenhalgh <james.greenhalgh@arm.com>
* gcc.target/aarch64/simd/vqshlb_1.c: New. * gcc.target/aarch64/simd/vqshlb_1.c: New.
......
...@@ -15,6 +15,6 @@ t(struct B *b) ...@@ -15,6 +15,6 @@ t(struct B *b)
/* We should guess that the pointer of type B probably points to an instance /* We should guess that the pointer of type B probably points to an instance
of B or its derivates and exclude A::t from list of likely targets. */ of B or its derivates and exclude A::t from list of likely targets. */
/* { dg-final { scan-ipa-dump "Targets that are not likely" "devirt" } } */ /* { dg-final { scan-ipa-dump "Speculative targets" "devirt" } } */
/* { dg-final { scan-ipa-dump "1 speculatively devirtualized" "devirt" } } */ /* { dg-final { scan-ipa-dump "1 speculatively devirtualized" "devirt" } } */
/* { dg-final { cleanup-ipa-dump "devirt" } } */ /* { dg-final { cleanup-ipa-dump "devirt" } } */
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