File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
mlir/lib/Dialect/Affine/Utils Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -1936,8 +1936,8 @@ static LogicalResult generateCopy(
19361936 *nBegin = begin;
19371937 *nEnd = end;
19381938
1939- func::FuncOp f = begin->getParentOfType <func::FuncOp >();
1940- OpBuilder topBuilder (f.getBody ());
1939+ auto f = begin->getParentOfType <FunctionOpInterface >();
1940+ OpBuilder topBuilder (f.getFunctionBody ());
19411941 Value zeroIndex = topBuilder.create <arith::ConstantIndexOp>(f.getLoc (), 0 );
19421942
19431943 *sizeInBytes = 0 ;
@@ -1956,8 +1956,9 @@ static LogicalResult generateCopy(
19561956 OpBuilder &b = region.isWrite () ? epilogue : prologue;
19571957
19581958 // Builder to create constants at the top level.
1959- auto func = copyPlacementBlock->getParent ()->getParentOfType <func::FuncOp>();
1960- OpBuilder top (func.getBody ());
1959+ auto func =
1960+ copyPlacementBlock->getParent ()->getParentOfType <FunctionOpInterface>();
1961+ OpBuilder top (func.getFunctionBody ());
19611962
19621963 auto loc = region.loc ;
19631964 auto memref = region.memref ;
Original file line number Diff line number Diff line change @@ -1391,11 +1391,11 @@ LogicalResult mlir::affine::replaceAllMemRefUsesWith(
13911391 std::unique_ptr<PostDominanceInfo> postDomInfo;
13921392 if (domOpFilter)
13931393 domInfo = std::make_unique<DominanceInfo>(
1394- domOpFilter->getParentOfType <func::FuncOp >());
1394+ domOpFilter->getParentOfType <FunctionOpInterface >());
13951395
13961396 if (postDomOpFilter)
13971397 postDomInfo = std::make_unique<PostDominanceInfo>(
1398- postDomOpFilter->getParentOfType <func::FuncOp >());
1398+ postDomOpFilter->getParentOfType <FunctionOpInterface >());
13991399
14001400 // Walk all uses of old memref; collect ops to perform replacement. We use a
14011401 // DenseSet since an operation could potentially have multiple uses of a
You can’t perform that action at this time.
0 commit comments