Skip to content

Commit c6fbdf6

Browse files
committed
Fix Clang CI build error.
1 parent 35238be commit c6fbdf6

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,16 +1698,16 @@ void CGOpenMPRuntimeGPU::emitReduction(
16981698
const auto *LHSVar =
16991699
cast<VarDecl>(cast<DeclRefExpr>(LHSExprs[Idx])->getDecl());
17001700
Variable = CGF.GetAddrOfLocalVar(LHSVar).getPointer();
1701-
llvm::OpenMPIRBuilder::EvaluationKind EvalKind;
1701+
llvm::OpenMPIRBuilder::EvalKind EvalKind;
17021702
switch (CGF.getEvaluationKind(Private->getType())) {
17031703
case TEK_Scalar:
1704-
EvalKind = llvm::OpenMPIRBuilder::EvaluationKind::Scalar;
1704+
EvalKind = llvm::OpenMPIRBuilder::EvalKind::Scalar;
17051705
break;
17061706
case TEK_Complex:
1707-
EvalKind = llvm::OpenMPIRBuilder::EvaluationKind::Complex;
1707+
EvalKind = llvm::OpenMPIRBuilder::EvalKind::Complex;
17081708
break;
17091709
case TEK_Aggregate:
1710-
EvalKind = llvm::OpenMPIRBuilder::EvaluationKind::Aggregate;
1710+
EvalKind = llvm::OpenMPIRBuilder::EvalKind::Aggregate;
17111711
break;
17121712
}
17131713
auto ReductionGen = [&](InsertPointTy CodeGenIP, unsigned I,

llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,12 +1284,12 @@ class OpenMPIRBuilder {
12841284
std::function<InsertPointTy(InsertPointTy, Type *, Value *, Value *)>;
12851285

12861286
/// Enum class for reduction evaluation types scalar, complex and aggregate.
1287-
enum class EvaluationKind { Scalar, Complex, Aggregate };
1287+
enum class EvalKind { Scalar, Complex, Aggregate };
12881288

12891289
/// Information about an OpenMP reduction.
12901290
struct ReductionInfo {
12911291
ReductionInfo(Type *ElementType, Value *Variable, Value *PrivateVariable,
1292-
EvaluationKind EvaluationKind, ReductionGenCBTy ReductionGen,
1292+
EvalKind EvaluationKind, ReductionGenCBTy ReductionGen,
12931293
ReductionGenClangCBTy ReductionGenClang,
12941294
ReductionGenAtomicCBTy AtomicReductionGen)
12951295
: ElementType(ElementType), Variable(Variable),
@@ -1298,9 +1298,8 @@ class OpenMPIRBuilder {
12981298
AtomicReductionGen(AtomicReductionGen) {}
12991299
ReductionInfo(Value *PrivateVariable)
13001300
: ElementType(nullptr), Variable(nullptr),
1301-
PrivateVariable(PrivateVariable),
1302-
EvaluationKind(EvaluationKind::Scalar), ReductionGen(),
1303-
ReductionGenClang(), AtomicReductionGen() {}
1301+
PrivateVariable(PrivateVariable), EvaluationKind(EvalKind::Scalar),
1302+
ReductionGen(), ReductionGenClang(), AtomicReductionGen() {}
13041303

13051304
/// Reduction element type, must match pointee type of variable.
13061305
Type *ElementType;
@@ -1312,7 +1311,7 @@ class OpenMPIRBuilder {
13121311
Value *PrivateVariable;
13131312

13141313
/// Reduction evaluation type - scalar, complex or aggregate.
1315-
EvaluationKind EvaluationKind;
1314+
EvalKind EvaluationKind;
13161315

13171316
/// Callback for generating the reduction body. The IR produced by this will
13181317
/// be used to combine two values in a thread-safe context, e.g., under

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,13 +2348,13 @@ void OpenMPIRBuilder::emitReductionListCopy(
23482348
RemoteLaneOffset, ReductionArrayTy);
23492349
} else {
23502350
switch (RI.EvaluationKind) {
2351-
case EvaluationKind::Scalar: {
2351+
case EvalKind::Scalar: {
23522352
Value *Elem = Builder.CreateLoad(RI.ElementType, SrcElementAddr);
23532353
// Store the source element value to the dest element address.
23542354
Builder.CreateStore(Elem, DestElementAddr);
23552355
break;
23562356
}
2357-
case EvaluationKind::Complex: {
2357+
case EvalKind::Complex: {
23582358
Value *SrcRealPtr = Builder.CreateConstInBoundsGEP2_32(
23592359
RI.ElementType, SrcElementAddr, 0, 0, ".realp");
23602360
Value *SrcReal = Builder.CreateLoad(
@@ -2372,7 +2372,7 @@ void OpenMPIRBuilder::emitReductionListCopy(
23722372
Builder.CreateStore(SrcImg, DestImgPtr);
23732373
break;
23742374
}
2375-
case EvaluationKind::Aggregate: {
2375+
case EvalKind::Aggregate: {
23762376
Value *SizeVal = Builder.getInt64(
23772377
M.getDataLayout().getTypeStoreSize(RI.ElementType));
23782378
Builder.CreateMemCpy(
@@ -2869,12 +2869,12 @@ Function *OpenMPIRBuilder::emitListToGlobalCopyFunction(
28692869
ReductionsBufferTy, BufferVD, 0, En.index(), "sum");
28702870

28712871
switch (RI.EvaluationKind) {
2872-
case EvaluationKind::Scalar: {
2872+
case EvalKind::Scalar: {
28732873
Value *TargetElement = Builder.CreateLoad(RI.ElementType, ElemPtr);
28742874
Builder.CreateStore(TargetElement, GlobVal);
28752875
break;
28762876
}
2877-
case EvaluationKind::Complex: {
2877+
case EvalKind::Complex: {
28782878
Value *SrcRealPtr = Builder.CreateConstInBoundsGEP2_32(
28792879
RI.ElementType, ElemPtr, 0, 0, ".realp");
28802880
Value *SrcReal = Builder.CreateLoad(
@@ -2892,7 +2892,7 @@ Function *OpenMPIRBuilder::emitListToGlobalCopyFunction(
28922892
Builder.CreateStore(SrcImg, DestImgPtr);
28932893
break;
28942894
}
2895-
case EvaluationKind::Aggregate: {
2895+
case EvalKind::Aggregate: {
28962896
Value *SizeVal =
28972897
Builder.getInt64(M.getDataLayout().getTypeStoreSize(RI.ElementType));
28982898
Builder.CreateMemCpy(
@@ -3059,12 +3059,12 @@ Function *OpenMPIRBuilder::emitGlobalToListCopyFunction(
30593059
ReductionsBufferTy, BufferVD, 0, En.index(), "sum");
30603060

30613061
switch (RI.EvaluationKind) {
3062-
case EvaluationKind::Scalar: {
3062+
case EvalKind::Scalar: {
30633063
Value *TargetElement = Builder.CreateLoad(RI.ElementType, GlobValPtr);
30643064
Builder.CreateStore(TargetElement, ElemPtr);
30653065
break;
30663066
}
3067-
case EvaluationKind::Complex: {
3067+
case EvalKind::Complex: {
30683068
Value *SrcRealPtr = Builder.CreateConstInBoundsGEP2_32(
30693069
RI.ElementType, GlobValPtr, 0, 0, ".realp");
30703070
Value *SrcReal = Builder.CreateLoad(
@@ -3082,7 +3082,7 @@ Function *OpenMPIRBuilder::emitGlobalToListCopyFunction(
30823082
Builder.CreateStore(SrcImg, DestImgPtr);
30833083
break;
30843084
}
3085-
case EvaluationKind::Aggregate: {
3085+
case EvalKind::Aggregate: {
30863086
Value *SizeVal =
30873087
Builder.getInt64(M.getDataLayout().getTypeStoreSize(RI.ElementType));
30883088
Builder.CreateMemCpy(

mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ static void collectReductionInfo(
874874
reductionInfos.push_back(
875875
{moduleTranslation.convertType(reductionDecls[i].getType()), variable,
876876
privateReductionVariables[i],
877-
/*EvaluationKind=*/llvm::OpenMPIRBuilder::EvaluationKind::Scalar,
877+
/*EvaluationKind=*/llvm::OpenMPIRBuilder::EvalKind::Scalar,
878878
owningReductionGens[i],
879879
/*ReductionGenClang=*/nullptr, atomicGen});
880880
}

0 commit comments

Comments
 (0)