@@ -229,11 +229,6 @@ static LogicalResult checkImplementationStatus(Operation &op) {
229
229
result = todo (" privatization" );
230
230
}
231
231
};
232
- auto checkReduction = [&todo](auto op, LogicalResult &result) {
233
- if (!op.getReductionVars ().empty () || op.getReductionByref () ||
234
- op.getReductionSyms ())
235
- result = todo (" reduction" );
236
- };
237
232
auto checkTaskReduction = [&todo](auto op, LogicalResult &result) {
238
233
if (!op.getTaskReductionVars ().empty () || op.getTaskReductionByref () ||
239
234
op.getTaskReductionSyms ())
@@ -1844,7 +1839,7 @@ static bool teamsReductionContainedInDistribute(omp::TeamsOp teamsOp) {
1844
1839
Operation *distOp = nullptr ;
1845
1840
for (auto ra : iface.getReductionBlockArgs ())
1846
1841
for (auto &use : ra.getUses ()) {
1847
- auto useOp = use.getOwner ();
1842
+ auto * useOp = use.getOwner ();
1848
1843
auto currentDistOp = useOp->getParentOfType <omp::DistributeOp>();
1849
1844
// Use is not inside a distribute op - return false
1850
1845
if (!currentDistOp)
@@ -4689,7 +4684,7 @@ static std::optional<int64_t> extractConstInteger(Value value) {
4689
4684
return std::nullopt;
4690
4685
}
4691
4686
4692
- static uint64_t getTypeByteSize (mlir::Type type, DataLayout dl) {
4687
+ static uint64_t getTypeByteSize (mlir::Type type, const DataLayout & dl) {
4693
4688
uint64_t sizeInBits = dl.getTypeSizeInBits (type);
4694
4689
uint64_t sizeInBytes = sizeInBits / 8 ;
4695
4690
return sizeInBytes;
@@ -4708,10 +4703,6 @@ static uint64_t getReductionDataSize(OpTy &op) {
4708
4703
return 0 ;
4709
4704
}
4710
4705
4711
- static uint64_t getTeamsReductionDataSize (mlir::omp::TeamsOp &teamsOp) {
4712
- return getReductionDataSize<mlir::omp::TeamsOp>(teamsOp);
4713
- }
4714
-
4715
4706
// / Populate default `MinTeams`, `MaxTeams` and `MaxThreads` to their default
4716
4707
// / values as stated by the corresponding clauses, if constant.
4717
4708
// /
@@ -4809,7 +4800,7 @@ initTargetDefaultAttrs(omp::TargetOp targetOp,
4809
4800
int32_t reductionDataSize = 0 ;
4810
4801
if (isGPU && capturedOp) {
4811
4802
if (auto teamsOp = castOrGetParentOfType<omp::TeamsOp>(capturedOp))
4812
- reductionDataSize = getTeamsReductionDataSize (teamsOp);
4803
+ reductionDataSize = getReductionDataSize (teamsOp);
4813
4804
}
4814
4805
4815
4806
// Update kernel attrs structure for the `OpenMPIRBuilder` to use.
0 commit comments