gcc-plugins: Clean up the cgraph_create_edge* macros
Drop useless redefinitions of cgraph_create_edge* macros. Drop the unused nest argument. Also support gcc-8, which doesn't have freq argument. Signed-off-by: Alexander Popov <alex.popov@linux.com> Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
parent
7ccb95e8fe
commit
45d9a1e3cc
|
@ -392,13 +392,6 @@ static inline struct cgraph_node *cgraph_alias_target(struct cgraph_node *n)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BUILDING_GCC_VERSION >= 4007 && BUILDING_GCC_VERSION <= 4009
|
|
||||||
#define cgraph_create_edge(caller, callee, call_stmt, count, freq, nest) \
|
|
||||||
cgraph_create_edge((caller), (callee), (call_stmt), (count), (freq))
|
|
||||||
#define cgraph_create_edge_including_clones(caller, callee, old_call_stmt, call_stmt, count, freq, nest, reason) \
|
|
||||||
cgraph_create_edge_including_clones((caller), (callee), (old_call_stmt), (call_stmt), (count), (freq), (reason))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if BUILDING_GCC_VERSION <= 4008
|
#if BUILDING_GCC_VERSION <= 4008
|
||||||
#define ENTRY_BLOCK_PTR_FOR_FN(FN) ENTRY_BLOCK_PTR_FOR_FUNCTION(FN)
|
#define ENTRY_BLOCK_PTR_FOR_FN(FN) ENTRY_BLOCK_PTR_FOR_FUNCTION(FN)
|
||||||
#define EXIT_BLOCK_PTR_FOR_FN(FN) EXIT_BLOCK_PTR_FOR_FUNCTION(FN)
|
#define EXIT_BLOCK_PTR_FOR_FN(FN) EXIT_BLOCK_PTR_FOR_FUNCTION(FN)
|
||||||
|
@ -723,10 +716,23 @@ static inline const char *get_decl_section_name(const_tree decl)
|
||||||
#define varpool_get_node(decl) varpool_node::get(decl)
|
#define varpool_get_node(decl) varpool_node::get(decl)
|
||||||
#define dump_varpool_node(file, node) (node)->dump(file)
|
#define dump_varpool_node(file, node) (node)->dump(file)
|
||||||
|
|
||||||
#define cgraph_create_edge(caller, callee, call_stmt, count, freq, nest) \
|
#if BUILDING_GCC_VERSION >= 8000
|
||||||
|
#define cgraph_create_edge(caller, callee, call_stmt, count, freq) \
|
||||||
|
(caller)->create_edge((callee), (call_stmt), (count))
|
||||||
|
|
||||||
|
#define cgraph_create_edge_including_clones(caller, callee, \
|
||||||
|
old_call_stmt, call_stmt, count, freq, reason) \
|
||||||
|
(caller)->create_edge_including_clones((callee), \
|
||||||
|
(old_call_stmt), (call_stmt), (count), (reason))
|
||||||
|
#else
|
||||||
|
#define cgraph_create_edge(caller, callee, call_stmt, count, freq) \
|
||||||
(caller)->create_edge((callee), (call_stmt), (count), (freq))
|
(caller)->create_edge((callee), (call_stmt), (count), (freq))
|
||||||
#define cgraph_create_edge_including_clones(caller, callee, old_call_stmt, call_stmt, count, freq, nest, reason) \
|
|
||||||
(caller)->create_edge_including_clones((callee), (old_call_stmt), (call_stmt), (count), (freq), (reason))
|
#define cgraph_create_edge_including_clones(caller, callee, \
|
||||||
|
old_call_stmt, call_stmt, count, freq, reason) \
|
||||||
|
(caller)->create_edge_including_clones((callee), \
|
||||||
|
(old_call_stmt), (call_stmt), (count), (freq), (reason))
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct cgraph_node *cgraph_node_ptr;
|
typedef struct cgraph_node *cgraph_node_ptr;
|
||||||
typedef struct cgraph_edge *cgraph_edge_p;
|
typedef struct cgraph_edge *cgraph_edge_p;
|
||||||
|
|
Loading…
Reference in New Issue