Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 6c1a7447 authored by Philippe Virouleau's avatar Philippe Virouleau Committed by Philippe Virouleau
Browse files

Update name to match the paper.

Use data/node/thread as affinity kinds instead of depend/numa/core.
parent 0fd5a16f
Branches
No related tags found
No related merge requests found
......@@ -980,6 +980,8 @@ def err_omp_expected_reduction_identifier : Error<
"expected identifier or one of the following operators: '+', '-', '*', '&', '|', '^', '&&', or '||'">;
def err_omp_decl_in_declare_simd : Error<
"function declaration is expected after 'declare simd' directive">;
def err_omp_unknown_affinity_kind : Error<
"incorrect affinity kind, expected one of 'data', 'node', or 'thread'">;
def err_omp_unknown_map_type : Error<
"incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'">;
def err_omp_unknown_map_type_modifier : Error<
......
......@@ -339,9 +339,9 @@ OPENMP_DEFAULTMAP_KIND(scalar)
OPENMP_DEFAULTMAP_MODIFIER(tofrom)
// Static attributes for 'affinity' clause.
OPENMP_AFFINITY_KIND(depend)
OPENMP_AFFINITY_KIND(numa)
OPENMP_AFFINITY_KIND(core)
OPENMP_AFFINITY_KIND(data)
OPENMP_AFFINITY_KIND(node)
OPENMP_AFFINITY_KIND(thread)
// Static attributes for 'depend' clause.
OPENMP_DEPEND_KIND(in)
......
......@@ -2692,19 +2692,19 @@ void CGOpenMPRuntime::emitTaskAffinityClause(CodeGenFunction &CGF,
// Constants for affinity kind accepted by the runtime.
enum AffinityKindTy {
AffinityNone = 0,
AffinityDepend,
AffinityNuma,
AffinityCore
AffinityData,
AffinityNode,
AffinityThread
} RuntimeAffinity;
switch (AffKind) {
case OMPC_AFFINITY_numa:
RuntimeAffinity = AffinityNuma;
case OMPC_AFFINITY_node:
RuntimeAffinity = AffinityNode;
break;
case OMPC_AFFINITY_core:
RuntimeAffinity = AffinityCore;
case OMPC_AFFINITY_thread:
RuntimeAffinity = AffinityThread;
break;
case OMPC_AFFINITY_depend:
RuntimeAffinity = AffinityDepend;
case OMPC_AFFINITY_data:
RuntimeAffinity = AffinityData;
break;
case OMPC_AFFINITY_unknown:
llvm_unreachable("Unsupported affinity value.");
......@@ -2712,7 +2712,7 @@ void CGOpenMPRuntime::emitTaskAffinityClause(CodeGenFunction &CGF,
llvm::Value *Affinity = CGF.EmitScalarExpr(Aff, /*IgnoreResultAssign*/ true);
const Type *ExprTy = Aff->getType().getTypePtr();
if (AffKind == OMPC_AFFINITY_depend && ExprTy->isPointerType()) {
if (AffKind == OMPC_AFFINITY_data && ExprTy->isPointerType()) {
Affinity = CGF.Builder.CreatePtrToInt(Affinity, CGF.Int64Ty);
}
......
......@@ -1605,8 +1605,7 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
Data.DepLinMapLoc = Tok.getLocation();
if (Data.AffKind == OMPC_AFFINITY_unknown) {
//FIXME use correct error message
Diag(Tok, diag::err_omp_unknown_map_type);
Diag(Tok, diag::err_omp_unknown_affinity_kind);
}
ConsumeToken();
if (Tok.is(tok::colon)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment