From 33d1d283f6005c4cee367472a3cc2ed278543e8d Mon Sep 17 00:00:00 2001 From: Jonathan Peyton Date: Tue, 13 Oct 2015 18:36:22 +0000 Subject: [PATCH] Detect final task in GOMP interface. llvm-svn: 250198 --- openmp/runtime/src/kmp_gsupport.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openmp/runtime/src/kmp_gsupport.c b/openmp/runtime/src/kmp_gsupport.c index 48487a3ffd3b..2a89aa2f942d 100644 --- a/openmp/runtime/src/kmp_gsupport.c +++ b/openmp/runtime/src/kmp_gsupport.c @@ -940,6 +940,10 @@ xexpand(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data, void (*copy_fu if (gomp_flags & 1) { input_flags->tiedness = 1; } + // The second low-order bit is the "final" flag + if (gomp_flags & 2) { + input_flags->final = 1; + } input_flags->native = 1; // __kmp_task_alloc() sets up all other flags