@@ -273,8 +273,8 @@ mlir::FuncOp get_to_memref_conversion_func(
273273 auto func_type = mlir::FunctionType::get (builder.getContext (), src_type, dst_type);
274274 auto loc = builder.getUnknownLoc ();
275275 auto new_func = plier::add_function (builder, module , func_name, func_type);
276- auto alwaysinline = mlir::StringAttr::get (" alwaysinline " , builder.getContext ());
277- new_func->setAttr (" passthrough" , mlir::ArrayAttr::get (alwaysinline, builder.getContext ()));
276+ auto alwaysinline = mlir::StringAttr::get (builder.getContext (), " alwaysinline " );
277+ new_func->setAttr (" passthrough" , mlir::ArrayAttr::get (builder.getContext (), alwaysinline ));
278278 mlir::OpBuilder::InsertionGuard guard (builder);
279279 auto block = new_func.addEntryBlock ();
280280 builder.setInsertionPointToStart (block);
@@ -326,8 +326,8 @@ mlir::FuncOp get_from_memref_conversion_func(
326326 auto func_type = mlir::FunctionType::get (builder.getContext (), src_type, dst_type);
327327 auto loc = builder.getUnknownLoc ();
328328 auto new_func = plier::add_function (builder, module , func_name, func_type);
329- auto alwaysinline = mlir::StringAttr::get (" alwaysinline " , builder.getContext ());
330- new_func->setAttr (" passthrough" , mlir::ArrayAttr::get (alwaysinline, builder.getContext ()));
329+ auto alwaysinline = mlir::StringAttr::get (builder.getContext (), " alwaysinline " );
330+ new_func->setAttr (" passthrough" , mlir::ArrayAttr::get (builder.getContext (), alwaysinline ));
331331 mlir::OpBuilder::InsertionGuard guard (builder);
332332 auto block = new_func.addEntryBlock ();
333333 builder.setInsertionPointToStart (block);
@@ -377,10 +377,10 @@ mlir::Attribute get_fastmath_attrs(mlir::MLIRContext& ctx)
377377 auto add_pair = [&](auto name, auto val)
378378 {
379379 const mlir::Attribute attrs[] = {
380- mlir::StringAttr::get (name, &ctx),
381- mlir::StringAttr::get (val, &ctx)
380+ mlir::StringAttr::get (&ctx, name ),
381+ mlir::StringAttr::get (&ctx, val )
382382 };
383- return mlir::ArrayAttr::get (attrs, &ctx);
383+ return mlir::ArrayAttr::get (&ctx, attrs );
384384 };
385385 const mlir::Attribute attrs[] = {
386386 add_pair (" denormal-fp-math" , " preserve-sign,preserve-sign" ),
@@ -391,7 +391,7 @@ mlir::Attribute get_fastmath_attrs(mlir::MLIRContext& ctx)
391391 add_pair (" unsafe-fp-math" , " true" ),
392392 add_pair (plier::attributes::getFastmathName (), " 1" ),
393393 };
394- return mlir::ArrayAttr::get (attrs, &ctx);
394+ return mlir::ArrayAttr::get (&ctx, attrs );
395395}
396396
397397void fix_func_sig (LLVMTypeHelper& type_helper, mlir::FuncOp func)
@@ -805,9 +805,10 @@ class CheckForPlierTypes :
805805 void runOnOperation () override
806806 {
807807 markAllAnalysesPreserved ();
808+ auto plier_dialect = getContext ().getOrLoadDialect <plier::PlierDialect>();
808809 getOperation ()->walk ([&](mlir::Operation* op)
809810 {
810- if (op->getName ().getDialect () == plier::PlierDialect::getDialectNamespace () )
811+ if (op->getName ().getDialect () == plier_dialect )
811812 {
812813 op->emitOpError (" : not all plier ops were translated\n " );
813814 signalPassFailure ();
@@ -1170,7 +1171,7 @@ struct LowerParallelToCFGPass :
11701171 mlir::OwningRewritePatternList patterns;
11711172 patterns.insert <LowerParallel>(&getContext ());
11721173
1173- mlir::applyPatternsAndFoldGreedily (getOperation (), std::move (patterns));
1174+ ( void ) mlir::applyPatternsAndFoldGreedily (getOperation (), std::move (patterns));
11741175 }
11751176};
11761177
@@ -1194,7 +1195,7 @@ struct PreLLVMLowering : public mlir::PassWrapper<PreLLVMLowering, mlir::Functio
11941195 patterns.insert <ReturnOpLowering>(&getContext (),
11951196 type_helper.get_type_converter ());
11961197
1197- mlir::applyPatternsAndFoldGreedily (getOperation (), std::move (patterns));
1198+ ( void ) mlir::applyPatternsAndFoldGreedily (getOperation (), std::move (patterns));
11981199 }
11991200};
12001201
@@ -1283,7 +1284,7 @@ struct LLVMLoweringPass : public mlir::PassWrapper<LLVMLoweringPass, mlir::Opera
12831284 if (failed (applyPartialConversion (m, target, std::move (patterns))))
12841285 signalPassFailure ();
12851286 m->setAttr (LLVM::LLVMDialect::getDataLayoutAttrName (),
1286- StringAttr::get (options. dataLayout . getStringRepresentation (), m. getContext ()));
1287+ StringAttr::get (m. getContext (), options. dataLayout . getStringRepresentation ()));
12871288 }
12881289
12891290private:
0 commit comments