@@ -3197,7 +3197,7 @@ convertOmpAtomicWrite(Operation &opInst, llvm::IRBuilderBase &builder,
3197
3197
3198
3198
// / Converts an LLVM dialect binary operation to the corresponding enum value
3199
3199
// / for `atomicrmw` supported binary operation.
3200
- llvm::AtomicRMWInst::BinOp convertBinOpToAtomic (Operation &op) {
3200
+ static llvm::AtomicRMWInst::BinOp convertBinOpToAtomic (Operation &op) {
3201
3201
return llvm::TypeSwitch<Operation *, llvm::AtomicRMWInst::BinOp>(&op)
3202
3202
.Case ([&](LLVM::AddOp) { return llvm::AtomicRMWInst::BinOp::Add; })
3203
3203
.Case ([&](LLVM::SubOp) { return llvm::AtomicRMWInst::BinOp::Sub; })
@@ -3211,10 +3211,10 @@ llvm::AtomicRMWInst::BinOp convertBinOpToAtomic(Operation &op) {
3211
3211
.Default (llvm::AtomicRMWInst::BinOp::BAD_BINOP);
3212
3212
}
3213
3213
3214
- void extractAtomicControlFlags (omp::AtomicUpdateOp atomicUpdateOp,
3215
- bool &isIgnoreDenormalMode,
3216
- bool &isFineGrainedMemory,
3217
- bool &isRemoteMemory) {
3214
+ static void extractAtomicControlFlags (omp::AtomicUpdateOp atomicUpdateOp,
3215
+ bool &isIgnoreDenormalMode,
3216
+ bool &isFineGrainedMemory,
3217
+ bool &isRemoteMemory) {
3218
3218
isIgnoreDenormalMode = false ;
3219
3219
isFineGrainedMemory = false ;
3220
3220
isRemoteMemory = false ;
@@ -3672,7 +3672,8 @@ struct MapInfoData : MapInfosTy {
3672
3672
};
3673
3673
} // namespace
3674
3674
3675
- uint64_t getArrayElementSizeInBits (LLVM::LLVMArrayType arrTy, DataLayout &dl) {
3675
+ static uint64_t getArrayElementSizeInBits (LLVM::LLVMArrayType arrTy,
3676
+ DataLayout &dl) {
3676
3677
if (auto nestedArrTy = llvm::dyn_cast_if_present<LLVM::LLVMArrayType>(
3677
3678
arrTy.getElementType ()))
3678
3679
return getArrayElementSizeInBits (nestedArrTy, dl);
@@ -3689,10 +3690,12 @@ uint64_t getArrayElementSizeInBits(LLVM::LLVMArrayType arrTy, DataLayout &dl) {
3689
3690
// structures.
3690
3691
// This function is somewhat equivalent to Clang's getExprTypeSize inside of
3691
3692
// CGOpenMPRuntime.cpp.
3692
- llvm::Value *getSizeInBytes (DataLayout &dl, const mlir::Type &type,
3693
- Operation *clauseOp, llvm::Value *basePointer,
3694
- llvm::Type *baseType, llvm::IRBuilderBase &builder,
3695
- LLVM::ModuleTranslation &moduleTranslation) {
3693
+ static llvm::Value *getSizeInBytes (DataLayout &dl, const mlir::Type &type,
3694
+ Operation *clauseOp,
3695
+ llvm::Value *basePointer,
3696
+ llvm::Type *baseType,
3697
+ llvm::IRBuilderBase &builder,
3698
+ LLVM::ModuleTranslation &moduleTranslation) {
3696
3699
if (auto memberClause =
3697
3700
mlir::dyn_cast_if_present<mlir::omp::MapInfoOp>(clauseOp)) {
3698
3701
// This calculates the size to transfer based on bounds and the underlying
@@ -3959,7 +3962,7 @@ static omp::MapInfoOp getFirstOrLastMappedMemberPtr(omp::MapInfoOp mapInfo,
3959
3962
// / ordering of generated bounds operations (one may have to flip them) to
3960
3963
// / make the below lowering frontend agnostic. The offload size
3961
3964
// / calcualtion may also have to be adjusted for C++.
3962
- std::vector<llvm::Value *>
3965
+ static std::vector<llvm::Value *>
3963
3966
calculateBoundsOffset (LLVM::ModuleTranslation &moduleTranslation,
3964
3967
llvm::IRBuilderBase &builder, bool isArrayTy,
3965
3968
OperandRange bounds) {
@@ -4899,8 +4902,9 @@ convertOmpDistribute(Operation &opInst, llvm::IRBuilderBase &builder,
4899
4902
// / Lowers the FlagsAttr which is applied to the module on the device
4900
4903
// / pass when offloading, this attribute contains OpenMP RTL globals that can
4901
4904
// / be passed as flags to the frontend, otherwise they are set to default
4902
- LogicalResult convertFlagsAttr (Operation *op, mlir::omp::FlagsAttr attribute,
4903
- LLVM::ModuleTranslation &moduleTranslation) {
4905
+ static LogicalResult
4906
+ convertFlagsAttr (Operation *op, mlir::omp::FlagsAttr attribute,
4907
+ LLVM::ModuleTranslation &moduleTranslation) {
4904
4908
if (!cast<mlir::ModuleOp>(op))
4905
4909
return failure ();
4906
4910
0 commit comments