+2019-11-04 Jan Hubicka <jh@suse.cz>
+
+ * ipa-inline-transform.c: Include ipa-utils.h
+ (inline_call): Set thunk_expansion flag.
+ * ipa-utils.h (thunk_expansion): Declare.
+ * ipa-devirt.c (thunk_expansion): New global var.
+ (devirt_node_removal_hook): Do not invalidate cache while
+ doing thunk expansion.
+
2019-11-04 Tamar Christina <tamar.christina@arm.com>
* tree-vect-slp.c (vectorize_slp_instance_root_stmt): Initialize rstmt.
}
};
+/* HACK alert: this is used to communicate with ipa-inline-transform that
+ thunk is being expanded and there is no need to clear the polymorphic
+ call target cache. */
+bool thunk_expansion;
+
static bool odr_types_equivalent_p (tree, tree, bool, bool *,
hash_set<type_pair> *,
location_t, location_t);
devirt_node_removal_hook (struct cgraph_node *n, void *d ATTRIBUTE_UNUSED)
{
if (cached_polymorphic_call_targets
+ && !thunk_expansion
&& cached_polymorphic_call_targets->contains (n))
free_polymorphic_call_targets_hash ();
}
#include "function.h"
#include "cfg.h"
#include "basic-block.h"
+#include "ipa-utils.h"
int ncalls_inlined;
int nfunctions_inlined;
if (to->thunk.thunk_p)
{
struct cgraph_node *target = to->callees->callee;
+ thunk_expansion = true;
symtab->call_cgraph_removal_hooks (to);
if (in_lto_p)
to->get_untransformed_body ();
for (e = to->callees; e && e->callee != target; e = e->next_callee)
;
symtab->call_cgraph_insertion_hooks (to);
+ thunk_expansion = false;
gcc_assert (e);
}
struct cgraph_node *src, bool preserve_body = false);
bool recursive_call_p (tree, tree);
+/* In ipa-prop.c */
+void ipa_remove_useless_jump_functions ();
+
/* In ipa-profile.c */
bool ipa_propagate_frequency (struct cgraph_node *node);
struct odr_type_d;
typedef odr_type_d *odr_type;
+extern bool thunk_expansion;
void build_type_inheritance_graph (void);
void rebuild_type_inheritance_graph (void);
void update_type_inheritance_graph (void);