diff --git a/compiler/src/iree/compiler/Codegen/Common/CPU/CPUPrepareUkernels.cpp b/compiler/src/iree/compiler/Codegen/Common/CPU/CPUPrepareUkernels.cpp index 0f8c38bebdd3..7f4d62b26bda 100644 --- a/compiler/src/iree/compiler/Codegen/Common/CPU/CPUPrepareUkernels.cpp +++ b/compiler/src/iree/compiler/Codegen/Common/CPU/CPUPrepareUkernels.cpp @@ -75,7 +75,7 @@ static void tileNonPackedDimsFor3DPackOps(RewriterBase &rewriter, FailureOr tilingResult = scf::tileUsingSCF(rewriter, tilingInterfaceOp, options); assert(succeeded(tilingResult)); - rewriter.replaceOp(packOp, tilingResult->replacements); + rewriter.replaceOp(packOp, tilingResult->mergeResult.replacements); }); } @@ -110,7 +110,7 @@ static void tileNonPackedDimsFor5DPUnpackOps(RewriterBase &rewriter, FailureOr tilingResult = scf::tileUsingSCF(rewriter, tilingInterfaceOp, options); assert(succeeded(tilingResult)); - rewriter.replaceOp(unpackOp, tilingResult->replacements); + rewriter.replaceOp(unpackOp, tilingResult->mergeResult.replacements); }); } diff --git a/compiler/src/iree/compiler/Codegen/Common/DecomposePackUnPackOps.cpp b/compiler/src/iree/compiler/Codegen/Common/DecomposePackUnPackOps.cpp index 763b04042e30..173f50b4eed2 100644 --- a/compiler/src/iree/compiler/Codegen/Common/DecomposePackUnPackOps.cpp +++ b/compiler/src/iree/compiler/Codegen/Common/DecomposePackUnPackOps.cpp @@ -200,7 +200,7 @@ static LogicalResult commonRunOnOperation( unpackTilingOptions); if (failed(tilingResult)) return WalkResult::interrupt(); - rewriter.replaceOp(op, tilingResult->replacements); + rewriter.replaceOp(op, tilingResult->mergeResult.replacements); return WalkResult::advance(); }); if (status.wasInterrupted()) { diff --git a/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTensorTile.cpp b/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTensorTile.cpp index a7f88042d3df..0487a898cdca 100644 --- a/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTensorTile.cpp +++ b/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTensorTile.cpp @@ -90,7 +90,7 @@ class TileConsumerAndFuseInputProducer final } // Replace the tiled op with replacements. - rewriter.replaceOp(op, tilingResult->replacements); + rewriter.replaceOp(op, tilingResult->mergeResult.replacements); filter.replaceLinalgTransformationFilter(rewriter, tilingResult->tiledOps.front()); @@ -292,7 +292,7 @@ static LogicalResult tileParallelDims(mlir::FunctionOpInterface funcOp, if (failed(tilingResult)) { return tilingOp->emitOpError("failed to tile to scf.forall"); } - rewriter.replaceOp(tilingOp, tilingResult->replacements); + rewriter.replaceOp(tilingOp, tilingResult->mergeResult.replacements); } return success(); } diff --git a/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTileReduction.cpp b/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTileReduction.cpp index 28bed8f037f9..bad51d02d4c1 100644 --- a/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTileReduction.cpp +++ b/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTileReduction.cpp @@ -38,10 +38,11 @@ static LogicalResult tileReduction(linalg::LinalgOp op) { sizes.push_back(rewriter.getIndexAttr(size)); } rewriter.setInsertionPoint(op); - FailureOr results = scf::tileReductionUsingScf( + FailureOr results = scf::tileReductionUsingScf( rewriter, cast(op.getOperation()), sizes); if (failed(results)) return failure(); + rewriter.replaceOp(op, results->mergeResult.replacements); return success(); } diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPU2DScalableTo1DScalable.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPU2DScalableTo1DScalable.cpp index 917fe500513f..f8400fe2ea6d 100644 --- a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPU2DScalableTo1DScalable.cpp +++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPU2DScalableTo1DScalable.cpp @@ -161,7 +161,7 @@ dropScalabilityFromUnsupportedOperations(mlir::FunctionOpInterface funcOp, setLoweringConfig(newOp, newLoweringConfig); } - rewriter.replaceOp(tilingOp, tilingResult->replacements); + rewriter.replaceOp(tilingOp, tilingResult->mergeResult.replacements); } return success(); } diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUSplitReduction.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUSplitReduction.cpp index 4ef391df6200..0627ae3ccbae 100644 --- a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUSplitReduction.cpp +++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUSplitReduction.cpp @@ -132,7 +132,7 @@ LogicalResult splitReductionImpl(Operation *op, int64_t size, LLVM_DEBUG(llvm::dbgs() << "failed on step 1 (SCFTiling)\n"); return failure(); } - rewriter.replaceOp(linalgOp, tileResFirst->replacements); + rewriter.replaceOp(linalgOp, tileResFirst->mergeResult.replacements); // 2) Apply splitReduction on the single vector-length array. // splitReduction already replaces the op. @@ -159,7 +159,8 @@ LogicalResult splitReductionImpl(Operation *op, int64_t size, LLVM_DEBUG(llvm::dbgs() << "failed on step 3 (SCFTiling)\n"); return failure(); } - rewriter.replaceOp(splitRes->splitLinalgOp, tileRes->replacements); + rewriter.replaceOp(splitRes->splitLinalgOp, + tileRes->mergeResult.replacements); return success(); } diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUTile.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUTile.cpp index aba35c0222ce..a0529d6410e9 100644 --- a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUTile.cpp +++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUTile.cpp @@ -101,7 +101,7 @@ void LLVMCPUTilePass::runOnOperation() { scf::tileUsingSCF(rewriter, op, options); if (failed(tiledResults)) continue; - rewriter.replaceOp(op, tiledResults->replacements); + rewriter.replaceOp(op, tiledResults->mergeResult.replacements); } RewritePatternSet patterns = diff --git a/compiler/src/iree/compiler/Codegen/Transforms/Transforms.cpp b/compiler/src/iree/compiler/Codegen/Transforms/Transforms.cpp index 980925ccb11a..3b6aa5fa4beb 100644 --- a/compiler/src/iree/compiler/Codegen/Transforms/Transforms.cpp +++ b/compiler/src/iree/compiler/Codegen/Transforms/Transforms.cpp @@ -1256,7 +1256,7 @@ LogicalResult tileLinalgOpsWithFilter(mlir::FunctionOpInterface funcOp, for (auto tiledOp : tiledResults->tiledOps) { filter.replaceLinalgTransformationFilter(rewriter, tiledOp); } - rewriter.replaceOp(op, tiledResults->replacements); + rewriter.replaceOp(op, tiledResults->mergeResult.replacements); } return success(); diff --git a/third_party/llvm-project b/third_party/llvm-project index 13ae7e49984f..82c37276df5b 160000 --- a/third_party/llvm-project +++ b/third_party/llvm-project @@ -1 +1 @@ -Subproject commit 13ae7e49984f863fdaa01833a3bd0ff20c71dc6e +Subproject commit 82c37276df5bb5f6351079fa4df8d609abd908b7