summaryrefslogtreecommitdiff
path: root/gcc/ipa-utils.h
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-22 09:32:07 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-22 09:32:07 +0000
commit07c6dcc3ec27545add1c459ff73e19e687b2512c (patch)
tree4a67019baa93af0815f23244fb5d3620e2978469 /gcc/ipa-utils.h
parenta7f1dd1901851b75475934f443bcfe14ac20e859 (diff)
downloadgcc-07c6dcc3ec27545add1c459ff73e19e687b2512c.tar.gz
* cgraphunit.c (analyze_functions) Use update_type_inheritance_graph.
* ipa-utils.h (update_type_inheritance_graph): Declare. (possible_polymorphic_call_target_p): Declare. (possible_polymorphic_call_target_p): New. * ipa-devirt.c: Update toplevel comments. (cached_polymorphic_call_targets): Move up. (odr_type_d): Move ID down. (polymorphic_type_binfo_p): Update comment. (odr_hasher::remove): Likewise; (get_odr_type): Set anonymous_namespace. (dump_odr_type): Dump it. (dump_type_inheritance_graph): Do not ICE when there are no ODR types. (maybe_record_node): Record node in cached_polymorphic_call_targets. (record_binfo): Add comment. (free_polymorphic_call_targets_hash): Do not ICE when cache is not built. (devirt_node_removal_hook): Do not iCE when cache is freed. (possible_polymorphic_call_target_p): New predicate. (update_type_inheritance_graph): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201917 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-utils.h')
-rw-r--r--gcc/ipa-utils.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h
index f35ddb5dc54..3c6c93c10a1 100644
--- a/gcc/ipa-utils.h
+++ b/gcc/ipa-utils.h
@@ -50,12 +50,15 @@ tree get_base_var (tree);
struct odr_type_d;
typedef odr_type_d *odr_type;
void build_type_inheritance_graph (void);
+void update_type_inheritance_graph (void);
vec <cgraph_node *>
possible_polymorphic_call_targets (tree, HOST_WIDE_INT,
bool *final = NULL,
void **cache_token = NULL);
odr_type get_odr_type (tree, bool insert = false);
void dump_possible_polymorphic_call_targets (FILE *, tree, HOST_WIDE_INT);
+bool possible_polymorphic_call_target_p (tree, HOST_WIDE_INT,
+ struct cgraph_node *n);
/* Return vector containing possible targets of polymorphic call E.
If FINALP is non-NULL, store true if the list is complette.
@@ -87,6 +90,17 @@ dump_possible_polymorphic_call_targets (FILE *f, struct cgraph_edge *e)
dump_possible_polymorphic_call_targets (f, e->indirect_info->otr_type,
e->indirect_info->otr_token);
}
+
+/* Return true if N can be possibly target of a polymorphic call of
+ E. */
+
+inline bool
+possible_polymorphic_call_target_p (struct cgraph_edge *e,
+ struct cgraph_node *n)
+{
+ return possible_polymorphic_call_target_p (e->indirect_info->otr_type,
+ e->indirect_info->otr_token, n);
+}
#endif /* GCC_IPA_UTILS_H */