mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp(42): error C2446: ':': no conversion from 'OpTy' to 'OpTy'
with
[
OpTy=mlir::scf::ForOp
]
and
[
OpTy=mlir::AffineForOp
]
mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp(42): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
for (Operation *target : state.getPayloadOps(getTarget())) {
Operation *loop, *current = target;
for (unsigned i = 0, e = getNumLoops(); i < e; ++i) {
- loop = getAffine() ? current->getParentOfType<AffineForOp>()
- : current->getParentOfType<scf::ForOp>();
-
+ loop = getAffine()
+ ? current->getParentOfType<AffineForOp>().getOperation()
+ : current->getParentOfType<scf::ForOp>().getOperation();
if (!loop) {
DiagnosedSilenceableFailure diag =
emitSilenceableError()