File tree 3 files changed +13
-17
lines changed
3 files changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -115,16 +115,14 @@ void mlir::configureOpenMPToLLVMConversionLegality(
115
115
>([&](Operation *op) {
116
116
return typeConverter.isLegal (op->getOperandTypes ()) &&
117
117
typeConverter.isLegal (op->getResultTypes ()) &&
118
- std::all_of (op->getRegions ().begin (), op->getRegions ().end (),
119
- [&](Region ®ion) {
120
- return typeConverter.isLegal (®ion);
121
- }) &&
122
- std::all_of (op->getAttrs ().begin (), op->getAttrs ().end (),
123
- [&](NamedAttribute attr) {
124
- auto typeAttr = dyn_cast<TypeAttr>(attr.getValue ());
125
- return !typeAttr ||
126
- typeConverter.isLegal (typeAttr.getValue ());
127
- });
118
+ llvm::all_of (op->getRegions (),
119
+ [&](Region ®ion) {
120
+ return typeConverter.isLegal (®ion);
121
+ }) &&
122
+ llvm::all_of (op->getAttrs (), [&](NamedAttribute attr) {
123
+ auto typeAttr = dyn_cast<TypeAttr>(attr.getValue ());
124
+ return !typeAttr || typeConverter.isLegal (typeAttr.getValue ());
125
+ });
128
126
});
129
127
}
130
128
Original file line number Diff line number Diff line change @@ -251,10 +251,9 @@ struct LoadStoreLikeOpRewriter : public OpRewritePattern<LoadStoreLikeOp> {
251
251
// to do.
252
252
SmallVector<OpFoldResult> indices =
253
253
getAsOpFoldResult (loadStoreLikeOp.getIndices ());
254
- if (std::all_of (indices.begin (), indices.end (),
255
- [](const OpFoldResult &opFold) {
256
- return isConstantIntValue (opFold, 0 );
257
- })) {
254
+ if (llvm::all_of (indices, [](const OpFoldResult &opFold) {
255
+ return isConstantIntValue (opFold, 0 );
256
+ })) {
258
257
return rewriter.notifyMatchFailure (
259
258
loadStoreLikeOp, " no computation to extract: offsets are 0s" );
260
259
}
Original file line number Diff line number Diff line change @@ -312,9 +312,8 @@ LogicalResult LoadNdOp::verify() {
312
312
auto trans = getTranspose ().value ();
313
313
314
314
// Make sure the transpose value is valid.
315
- bool valid = std::all_of (trans.begin (), trans.end (), [&](int t) {
316
- return t >= 0 && t < tdescTy.getRank ();
317
- });
315
+ bool valid = llvm::all_of (
316
+ trans, [&](int t) { return t >= 0 && t < tdescTy.getRank (); });
318
317
319
318
if (valid)
320
319
transpose (trans, tdescShape);
You can’t perform that action at this time.
0 commit comments