aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 10758ca..cfe9be5 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic-core.h"
#include "builtins.h"
#include "ubsan.h"
+#include "cilk.h"
static tree do_mpc_arg1 (tree, tree, int (*)(mpc_ptr, mpc_srcptr, mpc_rnd_t));
@@ -235,6 +236,10 @@ is_builtin_name (const char *name)
return true;
if (strncmp (name, "__atomic_", 9) == 0)
return true;
+ if (flag_enable_cilkplus
+ && (!strcmp (name, "__cilkrts_detach")
+ || !strcmp (name, "__cilkrts_pop_frame")))
+ return true;
return false;
}
@@ -6685,6 +6690,14 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
expand_builtin_set_thread_pointer (exp);
return const0_rtx;
+ case BUILT_IN_CILK_DETACH:
+ expand_builtin_cilk_detach (exp);
+ return const0_rtx;
+
+ case BUILT_IN_CILK_POP_FRAME:
+ expand_builtin_cilk_pop_frame (exp);
+ return const0_rtx;
+
default: /* just do library call, if unknown builtin */
break;
}