aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index d19f1aa..148f29e 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1559,8 +1559,7 @@ cgraph_update_edges_for_call_stmt_node (cgraph_node *node,
{
/* Keep calls marked as dead dead. */
if (new_stmt && is_gimple_call (new_stmt) && e->callee
- && DECL_BUILT_IN_CLASS (e->callee->decl) == BUILT_IN_NORMAL
- && DECL_FUNCTION_CODE (e->callee->decl) == BUILT_IN_UNREACHABLE)
+ && fndecl_built_in_p (e->callee->decl, BUILT_IN_UNREACHABLE))
{
node->get_edge (old_stmt)->set_call_stmt
(as_a <gcall *> (new_stmt));
@@ -3060,8 +3059,8 @@ cgraph_edge::verify_corresponds_to_fndecl (tree decl)
/* Optimizers can redirect unreachable calls or calls triggering undefined
behavior to builtin_unreachable. */
- if (DECL_BUILT_IN_CLASS (callee->decl) == BUILT_IN_NORMAL
- && DECL_FUNCTION_CODE (callee->decl) == BUILT_IN_UNREACHABLE)
+
+ if (fndecl_built_in_p (callee->decl, BUILT_IN_UNREACHABLE))
return false;
if (callee->former_clone_of != node->decl
@@ -3187,8 +3186,7 @@ cgraph_node::verify_node (void)
/* Optimized out calls are redirected to __builtin_unreachable. */
&& (e->count.nonzero_p ()
|| ! e->callee->decl
- || DECL_BUILT_IN_CLASS (e->callee->decl) != BUILT_IN_NORMAL
- || DECL_FUNCTION_CODE (e->callee->decl) != BUILT_IN_UNREACHABLE)
+ || !fndecl_built_in_p (e->callee->decl, BUILT_IN_UNREACHABLE))
&& count
== ENTRY_BLOCK_PTR_FOR_FN (DECL_STRUCT_FUNCTION (decl))->count
&& (!e->count.ipa_p ()