File tree Expand file tree Collapse file tree 3 files changed +13
-17
lines changed Expand file tree Collapse file tree 3 files changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -115,16 +115,14 @@ void mlir::configureOpenMPToLLVMConversionLegality(
115115 >([&](Operation *op) {
116116 return typeConverter.isLegal (op->getOperandTypes ()) &&
117117 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+ });
128126 });
129127}
130128
Original file line number Diff line number Diff line change @@ -251,10 +251,9 @@ struct LoadStoreLikeOpRewriter : public OpRewritePattern<LoadStoreLikeOp> {
251251 // to do.
252252 SmallVector<OpFoldResult> indices =
253253 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+ })) {
258257 return rewriter.notifyMatchFailure (
259258 loadStoreLikeOp, " no computation to extract: offsets are 0s" );
260259 }
Original file line number Diff line number Diff line change @@ -312,9 +312,8 @@ LogicalResult LoadNdOp::verify() {
312312 auto trans = getTranspose ().value ();
313313
314314 // 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 (); });
318317
319318 if (valid)
320319 transpose (trans, tdescShape);
You can’t perform that action at this time.
0 commit comments