From 4d66f985e019ed6eb38d49aa08b9a541bfaf6d85 Mon Sep 17 00:00:00 2001 From: Philippe Virouleau <philippe.virouleau@imag.fr> Date: Tue, 7 Feb 2017 16:25:54 +0100 Subject: [PATCH] Another affinity --- include/clang/Basic/OpenMPKinds.def | 1 + lib/CodeGen/CGOpenMPRuntime.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/clang/Basic/OpenMPKinds.def b/include/clang/Basic/OpenMPKinds.def index d56210d4ae4..6d869604c26 100644 --- a/include/clang/Basic/OpenMPKinds.def +++ b/include/clang/Basic/OpenMPKinds.def @@ -343,6 +343,7 @@ OPENMP_DEFAULTMAP_MODIFIER(tofrom) OPENMP_AFFINITY_KIND(data) OPENMP_AFFINITY_KIND(node) OPENMP_AFFINITY_KIND(thread) +OPENMP_AFFINITY_KIND(task) // Static attributes for 'depend' clause. OPENMP_DEPEND_KIND(in) diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp index 88b9f30ebc5..c6f0e85e4cb 100644 --- a/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/lib/CodeGen/CGOpenMPRuntime.cpp @@ -2704,7 +2704,8 @@ void CGOpenMPRuntime::emitTaskAffinityClause(CodeGenFunction &CGF, AffinityNone = 0, AffinityData, AffinityNode, - AffinityThread + AffinityThread, + AffinityTask } RuntimeAffinity; switch (AffKind) { case OMPC_AFFINITY_node: @@ -2716,6 +2717,9 @@ void CGOpenMPRuntime::emitTaskAffinityClause(CodeGenFunction &CGF, case OMPC_AFFINITY_data: RuntimeAffinity = AffinityData; break; + case OMPC_AFFINITY_task: + RuntimeAffinity = AffinityTask; + break; case OMPC_AFFINITY_unknown: llvm_unreachable("Unsupported affinity value."); } -- GitLab