From 3187c8a5010f4245ff008a0fc2fb746a8bce4a00 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Wed, 2 Oct 2019 14:44:35 +0200 Subject: [PATCH] Do not check call type compatibility when cloning cgraph-edges 2019-10-02 Martin Jambor * cgraph.c (symbol_table::create_edge): New parameter cloning_p, do not compute some stuff when set. (cgraph_node::create_edge): Likewise. (cgraph_node::create_indirect_edge): Renamed last parameter to coning_p and flipped its meaning, don't even calculate inline_failed when set. * cgraph.h (cgraph_node::create_edge): Add new parameter. (symbol_table::::create_edge): Likewise. (cgraph_node::create_indirect_edge): Rename last parameter, flip the default value. * cgraphclones.c (cgraph_edge::clone): Pass true cloning_p to all call graph edge creating functions. From-SVN: r276455 --- gcc/cgraph.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'gcc/cgraph.h') diff --git a/gcc/cgraph.h b/gcc/cgraph.h index c35b6b9..66a4dae 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -1161,14 +1161,15 @@ struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node /* Create edge from a given function to CALLEE in the cgraph. */ cgraph_edge *create_edge (cgraph_node *callee, - gcall *call_stmt, profile_count count); + gcall *call_stmt, profile_count count, + bool cloning_p = false); /* Create an indirect edge with a yet-undetermined callee where the call statement destination is a formal parameter of the caller with index PARAM_INDEX. */ cgraph_edge *create_indirect_edge (gcall *call_stmt, int ecf_flags, profile_count count, - bool compute_indirect_info = true); + bool cloning_p = false); /* Like cgraph_create_edge walk the clone tree and update all clones sharing same function body. If clones already have edge for OLD_STMT; only @@ -2381,11 +2382,12 @@ private: inline cgraph_node * allocate_cgraph_symbol (void); /* Allocate a cgraph_edge structure and fill it with data according to the - parameters of which only CALLEE can be NULL (when creating an indirect call - edge). */ + parameters of which only CALLEE can be NULL (when creating an indirect + call edge). CLONING_P should be set if properties that are copied from an + original edge should not be calculated. */ cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gcall *call_stmt, profile_count count, - bool indir_unknown_callee); + bool indir_unknown_callee, bool cloning_p); /* Put the edge onto the free list. */ void free_edge (cgraph_edge *e); -- cgit v1.1