@@ -3197,7 +3197,7 @@ convertOmpAtomicWrite(Operation &opInst, llvm::IRBuilderBase &builder,
31973197
31983198// / Converts an LLVM dialect binary operation to the corresponding enum value
31993199// / for `atomicrmw` supported binary operation.
3200- llvm::AtomicRMWInst::BinOp convertBinOpToAtomic (Operation &op) {
3200+ static llvm::AtomicRMWInst::BinOp convertBinOpToAtomic (Operation &op) {
32013201 return llvm::TypeSwitch<Operation *, llvm::AtomicRMWInst::BinOp>(&op)
32023202 .Case ([&](LLVM::AddOp) { return llvm::AtomicRMWInst::BinOp::Add; })
32033203 .Case ([&](LLVM::SubOp) { return llvm::AtomicRMWInst::BinOp::Sub; })
@@ -3211,10 +3211,10 @@ llvm::AtomicRMWInst::BinOp convertBinOpToAtomic(Operation &op) {
32113211 .Default (llvm::AtomicRMWInst::BinOp::BAD_BINOP);
32123212}
32133213
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) {
32183218 isIgnoreDenormalMode = false ;
32193219 isFineGrainedMemory = false ;
32203220 isRemoteMemory = false ;
@@ -3672,7 +3672,8 @@ struct MapInfoData : MapInfosTy {
36723672};
36733673} // namespace
36743674
3675- uint64_t getArrayElementSizeInBits (LLVM::LLVMArrayType arrTy, DataLayout &dl) {
3675+ static uint64_t getArrayElementSizeInBits (LLVM::LLVMArrayType arrTy,
3676+ DataLayout &dl) {
36763677 if (auto nestedArrTy = llvm::dyn_cast_if_present<LLVM::LLVMArrayType>(
36773678 arrTy.getElementType ()))
36783679 return getArrayElementSizeInBits (nestedArrTy, dl);
@@ -3689,10 +3690,12 @@ uint64_t getArrayElementSizeInBits(LLVM::LLVMArrayType arrTy, DataLayout &dl) {
36893690// structures.
36903691// This function is somewhat equivalent to Clang's getExprTypeSize inside of
36913692// 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) {
36963699 if (auto memberClause =
36973700 mlir::dyn_cast_if_present<mlir::omp::MapInfoOp>(clauseOp)) {
36983701 // This calculates the size to transfer based on bounds and the underlying
@@ -3959,7 +3962,7 @@ static omp::MapInfoOp getFirstOrLastMappedMemberPtr(omp::MapInfoOp mapInfo,
39593962// / ordering of generated bounds operations (one may have to flip them) to
39603963// / make the below lowering frontend agnostic. The offload size
39613964// / calcualtion may also have to be adjusted for C++.
3962- std::vector<llvm::Value *>
3965+ static std::vector<llvm::Value *>
39633966calculateBoundsOffset (LLVM::ModuleTranslation &moduleTranslation,
39643967 llvm::IRBuilderBase &builder, bool isArrayTy,
39653968 OperandRange bounds) {
@@ -4899,8 +4902,9 @@ convertOmpDistribute(Operation &opInst, llvm::IRBuilderBase &builder,
48994902// / Lowers the FlagsAttr which is applied to the module on the device
49004903// / pass when offloading, this attribute contains OpenMP RTL globals that can
49014904// / 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) {
49044908 if (!cast<mlir::ModuleOp>(op))
49054909 return failure ();
49064910
0 commit comments