@@ -229,11 +229,6 @@ static LogicalResult checkImplementationStatus(Operation &op) {
229229 result = todo (" privatization" );
230230 }
231231 };
232- auto checkReduction = [&todo](auto op, LogicalResult &result) {
233- if (!op.getReductionVars ().empty () || op.getReductionByref () ||
234- op.getReductionSyms ())
235- result = todo (" reduction" );
236- };
237232 auto checkTaskReduction = [&todo](auto op, LogicalResult &result) {
238233 if (!op.getTaskReductionVars ().empty () || op.getTaskReductionByref () ||
239234 op.getTaskReductionSyms ())
@@ -1844,7 +1839,7 @@ static bool teamsReductionContainedInDistribute(omp::TeamsOp teamsOp) {
18441839 Operation *distOp = nullptr ;
18451840 for (auto ra : iface.getReductionBlockArgs ())
18461841 for (auto &use : ra.getUses ()) {
1847- auto useOp = use.getOwner ();
1842+ auto * useOp = use.getOwner ();
18481843 auto currentDistOp = useOp->getParentOfType <omp::DistributeOp>();
18491844 // Use is not inside a distribute op - return false
18501845 if (!currentDistOp)
@@ -4689,7 +4684,7 @@ static std::optional<int64_t> extractConstInteger(Value value) {
46894684 return std::nullopt ;
46904685}
46914686
4692- static uint64_t getTypeByteSize (mlir::Type type, DataLayout dl) {
4687+ static uint64_t getTypeByteSize (mlir::Type type, const DataLayout & dl) {
46934688 uint64_t sizeInBits = dl.getTypeSizeInBits (type);
46944689 uint64_t sizeInBytes = sizeInBits / 8 ;
46954690 return sizeInBytes;
@@ -4708,10 +4703,6 @@ static uint64_t getReductionDataSize(OpTy &op) {
47084703 return 0 ;
47094704}
47104705
4711- static uint64_t getTeamsReductionDataSize (mlir::omp::TeamsOp &teamsOp) {
4712- return getReductionDataSize<mlir::omp::TeamsOp>(teamsOp);
4713- }
4714-
47154706// / Populate default `MinTeams`, `MaxTeams` and `MaxThreads` to their default
47164707// / values as stated by the corresponding clauses, if constant.
47174708// /
@@ -4809,7 +4800,7 @@ initTargetDefaultAttrs(omp::TargetOp targetOp,
48094800 int32_t reductionDataSize = 0 ;
48104801 if (isGPU && capturedOp) {
48114802 if (auto teamsOp = castOrGetParentOfType<omp::TeamsOp>(capturedOp))
4812- reductionDataSize = getTeamsReductionDataSize (teamsOp);
4803+ reductionDataSize = getReductionDataSize (teamsOp);
48134804 }
48144805
48154806 // Update kernel attrs structure for the `OpenMPIRBuilder` to use.
0 commit comments