diff options
author | Martin Jambor <mjambor@suse.cz> | 2019-10-02 14:44:35 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2019-10-02 14:44:35 +0200 |
commit | 3187c8a5010f4245ff008a0fc2fb746a8bce4a00 (patch) | |
tree | 57403e651339babab9bbb759ade26ac1ce118719 /gcc/cgraph.h | |
parent | 569651fd6fdb6455da58f7811e6296c22ce34df7 (diff) | |
download | gcc-3187c8a5010f4245ff008a0fc2fb746a8bce4a00.zip gcc-3187c8a5010f4245ff008a0fc2fb746a8bce4a00.tar.gz gcc-3187c8a5010f4245ff008a0fc2fb746a8bce4a00.tar.bz2 |
[PATCH] Do not check call type compatibility when cloning cgraph-edges
2019-10-02 Martin Jambor <mjambor@suse.cz>
* 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
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 12 |
1 files changed, 7 insertions, 5 deletions
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); |