@@ -196,8 +196,8 @@ struct DeclMapperOpConversion
196
196
SmallVector<NamedAttribute> newAttrs;
197
197
newAttrs.emplace_back (curOp.getSymNameAttrName (), curOp.getSymNameAttr ());
198
198
newAttrs.emplace_back (
199
- curOp.getVarTypeAttrName (),
200
- TypeAttr::get (converter->convertType (curOp.getVarType ())));
199
+ curOp.getTypeAttrName (),
200
+ TypeAttr::get (converter->convertType (curOp.getType ())));
201
201
202
202
auto newOp = rewriter.create <omp::DeclareMapperOp>(
203
203
curOp.getLoc (), TypeRange (), adaptor.getOperands (), newAttrs);
@@ -252,12 +252,13 @@ void mlir::configureOpenMPToLLVMConversionLegality(
252
252
target.addDynamicallyLegalOp <
253
253
omp::AtomicReadOp, omp::AtomicWriteOp, omp::CancellationPointOp,
254
254
omp::CancelOp, omp::CriticalDeclareOp, omp::DeclareMapperInfoOp,
255
- omp::FlushOp, omp::MapBoundsOp, omp::MapInfoOp, omp::OrderedOp, omp::ScanOp,
256
- omp::TargetEnterDataOp, omp::TargetExitDataOp, omp::TargetUpdateOp,
257
- omp::ThreadprivateOp, omp::YieldOp>([&](Operation *op) {
258
- return typeConverter.isLegal (op->getOperandTypes ()) &&
259
- typeConverter.isLegal (op->getResultTypes ());
260
- });
255
+ omp::FlushOp, omp::MapBoundsOp, omp::MapInfoOp, omp::OrderedOp,
256
+ omp::ScanOp, omp::TargetEnterDataOp, omp::TargetExitDataOp,
257
+ omp::TargetUpdateOp, omp::ThreadprivateOp, omp::YieldOp>(
258
+ [&](Operation *op) {
259
+ return typeConverter.isLegal (op->getOperandTypes ()) &&
260
+ typeConverter.isLegal (op->getResultTypes ());
261
+ });
261
262
target.addDynamicallyLegalOp <
262
263
omp::AtomicUpdateOp, omp::CriticalOp, omp::DeclareMapperOp,
263
264
omp::DeclareReductionOp, omp::DistributeOp, omp::LoopNestOp, omp::LoopOp,
0 commit comments