summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
AgeCommit message (Collapse)Author
2023-12-19[mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. ↵Han-Chung Wang
(#75410) It is a trivial early-return case. If the cloned ops are not returned, it will generate `extract_slice` op that extracts the whole slice. However, it is not folded away. Early-return to avoid the case. E.g., ```mlir func.func @matmul_tensors( %arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf32>, %arg2: tensor<?x?xf32>) -> tensor<?x?xf32> { %0 = linalg.matmul ins(%arg0, %arg1: tensor<?x?xf32>, tensor<?x?xf32>) outs(%arg2: tensor<?x?xf32>) -> tensor<?x?xf32> return %0 : tensor<?x?xf32> } module attributes {transform.with_named_sequence} { transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) { %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op %1 = transform.structured.tile_using_for %0 [0, 0, 0] : (!transform.any_op) -> (!transform.any_op) transform.yield } } ``` Apply the transforms and canonicalize the IR: ``` mlir-opt --transform-interpreter -canonicalize input.mlir ``` we will get ```mlir module { func.func @matmul_tensors(%arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf32>, %arg2: tensor<?x?xf32>) -> tensor<?x?xf32> { %c1 = arith.constant 1 : index %c0 = arith.constant 0 : index %dim = tensor.dim %arg0, %c0 : tensor<?x?xf32> %dim_0 = tensor.dim %arg0, %c1 : tensor<?x?xf32> %dim_1 = tensor.dim %arg1, %c1 : tensor<?x?xf32> %extracted_slice = tensor.extract_slice %arg0[0, 0] [%dim, %dim_0] [1, 1] : tensor<?x?xf32> to tensor<?x?xf32> %extracted_slice_2 = tensor.extract_slice %arg1[0, 0] [%dim_0, %dim_1] [1, 1] : tensor<?x?xf32> to tensor<?x?xf32> %extracted_slice_3 = tensor.extract_slice %arg2[0, 0] [%dim, %dim_1] [1, 1] : tensor<?x?xf32> to tensor<?x?xf32> %0 = linalg.matmul ins(%extracted_slice, %extracted_slice_2 : tensor<?x?xf32>, tensor<?x?xf32>) outs(%extracted_slice_3 : tensor<?x?xf32>) -> tensor<?x?xf32> return %0 : tensor<?x?xf32> } } ``` The revision early-return the case so we can get: ```mlir func.func @matmul_tensors(%arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf32>, %arg2: tensor<?x?xf32>) -> tensor<?x?xf32> { %0 = linalg.matmul ins(%arg0, %arg1 : tensor<?x?xf32>, tensor<?x?xf32>) outs(%arg2 : tensor<?x?xf32>) -> tensor<?x?xf32> return %0 : tensor<?x?xf32> } ```
2023-11-20Fix build error from #72178 (#72905)MaheshRavishankar
2023-11-21[mlir] Non-void lambda does not return a value in all control paths in ↵Jie Fu
yieldReplacementForFusedProducer (NFC) /llvm-project/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp:703:5: error: non-void lambda does not return a value in all control paths [-Werror,-Wreturn-type] }; ^ 1 error generated.
2023-11-20[NFC] Simplify the tiling implementation using cloning. (#72178)MaheshRavishankar
The current implementation of tiling using `scf.for` is convoluted to make sure that the destination passing style of the untiled program is preserved. The addition of support to tile using `scf.forall` (adapted from the transform operation in Linalg) in https://github.com/llvm/llvm-project/pull/67083 used cloning of the tiled operations to better streamline the implementation. This PR adapts the other tiling methods to use a similar approach, making the transformations (and handling destination passing style semantics) more systematic. --------- Co-authored-by: Abhishek-Varma <avarma094@gmail.com>
2023-11-01[mlir][Interfaces] `LoopLikeOpInterface`: Expose tied loop results (#70535)Matthias Springer
Expose loop results, which correspond to the region iter_arg values that are returned from the loop when there are no more iterations. Exposing loop results is optional because some loops (e.g., `scf.while`) do not have a 1-to-1 mapping between region iter_args and op results. Also add additional helper functions to query tied results/iter_args/inits.
2023-10-28[mlir][Interfaces] `LoopLikeOpInterface`: Add helpers to query tied ↵Matthias Springer
inits/iter_args (#70408) The `LoopLikeOpInterface` already has interface methods to query inits and iter_args. This commit adds helper functions to query tied init/iter_arg pairs and removes the corresponding functions for `scf::ForOp`.
2023-10-20[mlir][SCF] Pass result of getAsOpFoldResult to getBoundedTileSize.Adrian Kuegel
A recent change modified the parameter tileSize from Value to OpFoldResult. Therefore we should call getAsOpFoldResult before passing on the tileSize. Adjust a test regarding this new behavior.
2023-10-19[mlir][TilingInterface] Add scf::tileUsingSCFForallOp method to tile using ↵MaheshRavishankar
the interface to generate `scf::forall`. (#67083) Similar to `scf::tileUsingSCFForOp` that is a method that tiles operations that implement the `TilingInterface`, using `scf.for` operations, this method introduces tiling of operations using `scf.forall`. Most of this implementation is derived from `linalg::tileToForallOp` method. Eventually that method will either be deprecated or moved to use the method introduced here.
2023-10-04[mlir][ODS] Change `get...Mutable` to return `OpOperand &` for single ↵Matthias Springer
operands (#66519) The TableGen code generator now generates C++ code that returns a single `OpOperand &` for `get...Mutable` of operands that are not variadic and not optional. `OpOperand::set`/`assign` can be used to set a value (same as `MutableOperandRange::assign`). This is safer than `MutableOperandRange` because only single values (and no longer `ValueRange`) can be assigned. E.g.: ``` // Assignment of multiple values to non-variadic operand. // Before: Compiles, but produces invalid op. // After: Compilation error. extractSliceOp.getSourceMutable().assign({v1, v2}); ```
2023-09-27[mlir] Partial revert of 93c42299bdb1ef094857ef2d065670af0695c26bAdrian Kuegel
This part of the change was not NFC.
2023-09-27[mlir][Interfaces] `LoopLikeOpInterface`: Add `replaceWithAdditionalYields` ↵Matthias Springer
(#67121) `affine::replaceForOpWithNewYields` and `replaceLoopWithNewYields` (for "scf.for") are now interface methods and additional loop-carried variables can now be added to "scf.for"/"affine.for" uniformly. (No more `TypeSwitch` needed.) Note: `scf.while` and other loops with loop-carried variables can implement `replaceWithAdditionalYields`, but to keep this commit small, that is not done in this commit.
2023-09-26[mlir][TilingInterface] NFC code changes separated out from introduction of ↵MaheshRavishankar
`scf::tileUsingSCFForallop`. (#67081) This patch contains NFC changes that are precursor to the introduction of `scf::tileUsingSCFForallOp` method introduced in https://github.com/llvm/llvm-project/pull/67083.
2023-09-21[mlir][Interfaces] Clean up `DestinationStyleOpInterface` (#67015)Matthias Springer
* "init" operands are specified with `MutableOperandRange` (which gives access to the underlying `OpOperand *`). No more magic numbers. * Remove most interface methods and make them helper functions. Only `getInitsMutable` should be implemented. * Provide separate helper functions for accessing mutable/immutable operands (`OpOperand`/`Value`, in line with #66515): `getInitsMutable` and `getInits` (same naming convention as auto-generated op accessors). `getInputOperands` was not renamed because this function cannot return a `MutableOperandRange` (because the operands are not necessarily consecutive). `OpOperandVector` is no longer needed. * The new `getDpsInits`/`getDpsInitsMutable` is more efficient than the old `getDpsInitOperands` because no `SmallVector` is created. The new functions return a range of operands. * Fix a bug in `getDpsInputOperands`: out-of-bounds operands were potentially returned.
2023-09-19[mlir][SCF] `ForOp`: Remove `getIterArgNumberForOpOperand` (#66629)Matthias Springer
This function was inconsistent with the remaining API because it accepted `OpOperand &` that do not belong to the op. All the other functions assert. This helper function is also not really necessary, as the iter_arg number is identical to the result number.
2023-09-19[mlir][IR] Change `MutableArrayRange` to enumerate `OpOperand &` (#66622)Matthias Springer
In line with #66515, change `MutableArrayRange::begin`/`end` to enumerate `OpOperand &` instead of `Value`. Also remove `ForOp::getIterOpOperands`/`setIterArg`, which are now redundant. Note: `MutableOperandRange` cannot be made a derived class of `indexed_accessor_range_base` (like `OperandRange`), because `MutableOperandRange::assign` can change the number of operands in the range.
2023-09-18[mlir][TilingInterface] Make the tiling set tile sizes function use ↵MaheshRavishankar
`OpFoldResult`. (#66566)
2023-09-18[mlir][IR] Change `MutableOperandRange::operator[]` to return an `OpOperand ↵Matthias Springer
&` (#66515) `operator[]` returns `OpOperand &` instead of `Value`. * This allows users to get OpOperands by name instead of "magic" number. E.g., `extractSliceOp->getOpOperand(0)` can be written as `extractSliceOp.getSourceMutable()[0]`. * `OperandRange` provides a read-only API to operands: `operator[]` returns `Value`. `MutableOperandRange` now provides a mutable API: `operator[]` returns `OpOperand &`, which can be used to set operands. Note: The TableGen code generator could be changed to return `OpOperand &` (instead of `MutableOperandRange`) for non-variadic and non-optional arguments in a subsequent change. Then the `[0]` part in the above example would no longer be necessary.
2023-08-17[mlir][Linalg] Implement tileReductionUsingScf for multiple reductionsGroverkss
This patch improves the reduction tiling for linalg to support multiple reduction dimensions. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D158005
2023-06-22[mlir][tensor] Clean up tensor::DimOp usageMatthias Springer
* Remove duplicate functions. `tensor::getMixedSize` and `tensor::getMixedSizes` should be used. * Use `tensor::getMixedSize` instead of `createOrFold<tensor::DimOp>`. This is more efficient. `createOrFold` will create an op an immediately try to fold it. In case of a static dimension size, an attribute can be used directly. Differential Revision: https://reviews.llvm.org/D153332
2023-05-12[mlir] Move casting calls from methods to function callsTres Popp
The MLIR classes Type/Attribute/Operation/Op/Value support cast/dyn_cast/isa/dyn_cast_or_null functionality through llvm's doCast functionality in addition to defining methods with the same name. This change begins the migration of uses of the method to the corresponding function call as has been decided as more consistent. Note that there still exist classes that only define methods directly, such as AffineExpr, and this does not include work currently to support a functional cast/isa call. Caveats include: - This clang-tidy script probably has more problems. - This only touches C++ code, so nothing that is being generated. Context: - https://mlir.llvm.org/deprecation/ at "Use the free function variants for dyn_cast/cast/isa/…" - Original discussion at https://discourse.llvm.org/t/preferred-casting-style-going-forward/68443 Implementation: This first patch was created with the following steps. The intention is to only do automated changes at first, so I waste less time if it's reverted, and so the first mass change is more clear as an example to other teams that will need to follow similar steps. Steps are described per line, as comments are removed by git: 0. Retrieve the change from the following to build clang-tidy with an additional check: https://github.com/llvm/llvm-project/compare/main...tpopp:llvm-project:tidy-cast-check 1. Build clang-tidy 2. Run clang-tidy over your entire codebase while disabling all checks and enabling the one relevant one. Run on all header files also. 3. Delete .inc files that were also modified, so the next build rebuilds them to a pure state. 4. Some changes have been deleted for the following reasons: - Some files had a variable also named cast - Some files had not included a header file that defines the cast functions - Some files are definitions of the classes that have the casting methods, so the code still refers to the method instead of the function without adding a prefix or removing the method declaration at the same time. ``` ninja -C $BUILD_DIR clang-tidy run-clang-tidy -clang-tidy-binary=$BUILD_DIR/bin/clang-tidy -checks='-*,misc-cast-functions'\ -header-filter=mlir/ mlir/* -fix rm -rf $BUILD_DIR/tools/mlir/**/*.inc git restore mlir/lib/IR mlir/lib/Dialect/DLTI/DLTI.cpp\ mlir/lib/Dialect/Complex/IR/ComplexDialect.cpp\ mlir/lib/**/IR/\ mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp\ mlir/lib/Dialect/Vector/Transforms/LowerVectorMultiReduction.cpp\ mlir/test/lib/Dialect/Test/TestTypes.cpp\ mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp\ mlir/test/lib/Dialect/Test/TestAttributes.cpp\ mlir/unittests/TableGen/EnumsGenTest.cpp\ mlir/test/python/lib/PythonTestCAPI.cpp\ mlir/include/mlir/IR/ ``` Differential Revision: https://reviews.llvm.org/D150123
2023-04-20[mlir][Affine][NFC] Wrap dialect in "affine" namespaceMatthias Springer
This cleanup aligns the affine dialect with all the other dialects. Differential Revision: https://reviews.llvm.org/D148687
2023-03-31[mlir][scf] Create constants for tiling in parent with isolated region.Oleg Shyshkov
FuncOp is IsolatedFromAbove, so this change doesn't alter current behaviour, but the current code fails if the tile op is in an op with IsolatedFromAbove trait. An alternative would be to create constant in the same region where they're used a rely on CSE to figure out where to move them. Differential Revision: https://reviews.llvm.org/D147273
2023-03-20Changes to `SCFFuseProducerOfSliceResult` to also return the operations ↵Mahesh Ravishankar
created during fusion. This is follow up to https://reviews.llvm.org/D145133 that allows propogating information about ops that are fused back to the caller. Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D146254
2023-03-16[mlir][TilingInterface] Modify `TilingInterface` methods to better return ↵Mahesh Ravishankar
the state of the transformed IR. Currently the `getTiledImplementation` and `generateResultTileValue` return just `SmallVector<Operation *>` and `FailureOr<Value>`. - For `getTiledImplementation` returning empty implies tiling wasnt done. There is also an implicit assumption that the tiled operation results correspond to the tiled values of the result of the original operation. This cannot handle cases where the tiled implementation might use multiple operations to compute the tiled value for the results of the untiled operation. Sometimes, the tiled operation might not directly give the tiled values, and might require casts, etc to get a replacement. - For `generateResultTileValue`, it is assumed that the op defining the returned `Value` is the operation that represents the tiled computation. Again presence of casts, etc violate this. Instead make these methods return ``` struct TilingResult { SmallVector<Operation *> tiledOps; SmallVector<Value> tiledValues; }; ``` The `tiledOps` represent the operations generated that are relevant for subsequent transformations. The `tiledValues` represent the tiled values for the results of the original operation. This better transmits the state of the transformed IR. As a consequence the following methods also return `FailureOr<TilingResult>` - `tensor::replaceExtractSliceWithTiledProducer` - `tensor::bubbleUpPadSlice` Differential Revision: https://reviews.llvm.org/D145133
2023-03-15[ADT] Allow `llvm::enumerate` to enumerate over multiple rangesJakub Kuderski
This does not work by a mere composition of `enumerate` and `zip_equal`, because C++17 does not allow for recursive expansion of structured bindings. This implementation uses `zippy` to manage the iteratees and adds the stream of indices as the first zipped range. Because we have an upfront assertion that all input ranges are of the same length, we only need to check if the second range has ended during iteration. As a consequence of using `zippy`, `enumerate` will now follow the reference and lifetime semantics of the `zip*` family of functions. The main difference is that `enumerate` exposes each tuple of references through a new tuple-like type `enumerate_result`, with the familiar `.index()` and `.value()` member functions. Because the `enumerate_result` returned on dereference is a temporary, enumeration result can no longer be used through an lvalue ref. Reviewed By: dblaikie, zero9178 Differential Revision: https://reviews.llvm.org/D144503
2023-03-14[mlir][Transform] NFC - Various API cleanups and use RewriterBase in lieu of ↵Nicolas Vasilache
PatternRewriter Depends on: D145685 Differential Revision: https://reviews.llvm.org/D145977
2023-01-28Use std::optional instead of llvm::Optional (NFC)Kazu Hirata
2023-01-16[mlir][TilingInterface] Fix use after free error from D141028.Mahesh Ravishankar
The `candidateSliceOp` was replaces and used in a subsequent call. Instead just replace its uses. The op is dead and will be removed with CSE. Differential Revision: https://reviews.llvm.org/D141869
2023-01-16[mlir][TilingInterface] Add an option to tile and fuse to yield replacement ↵Mahesh Ravishankar
for the fused producer. This patch adds an option to the method that fuses a producer with a tiled consumer, to also yield from the tiled loops a value that can be used to replace the original producer. This is only valid if it can be assertained that the slice of the producer computed within each iteration of the tiled loop nest does not compute slices of the producer redundantly. The analysis to derive this is very involved. So this is left to the caller to assertain. A test is added that mimics the `scf::tileConsumerAndFuseProducersGreedilyUsingSCFForOp`, but also yields the values of all fused producers. This can be used as a reference for how a caller could use this functionality. Differential Revision: https://reviews.llvm.org/D141028
2023-01-16[mlir][TilingInterface] NFC: Separate out a utility method to perform one ↵Mahesh Ravishankar
step of tile + fuse. Differential Revision: https://reviews.llvm.org/D141027
2023-01-16[mlir][TilingInterface] NFC: Consolidate yield handling.Mahesh Ravishankar
Add a new utility method to yield the tiled value as well as preserving destination passing style. Differential Revision: https://reviews.llvm.org/D139392
2023-01-05[mlir] fix out-of-bounds in reduction tilingAlex Zinenko
A transformation tiling a reduction dimension of a Linalg op needs a tile size for said dimension. When an insufficient number of dimensions was provided, it would segfault due to out-of-bounds access to a vector. Also fix incorrect error reporting in the structured transform op exercising this functionality. Reviewed By: springerm, ThomasRaoux Differential Revision: https://reviews.llvm.org/D141046
2022-12-17[mlir] llvm::Optional::value => operator*/operator->Fangrui Song
std::optional::value() has undesired exception checking semantics and is unavailable in older Xcode (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS). The call sites block std::optional migration.
2022-12-17mlir/tblgen: use std::optional in generationRamkumar Ramachandra
This is part of an effort to migrate from llvm::Optional to std::optional. This patch changes the way mlir-tblgen generates .inc files, and modifies tests and documentation appropriately. It is a "no compromises" patch, and doesn't leave the user with an unpleasant mix of llvm::Optional and std::optional. A non-trivial change has been made to ControlFlowInterfaces to split one constructor into two, relating to a build failure on Windows. See also: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 Signed-off-by: Ramkumar Ramachandra <r@artagnon.com> Differential Revision: https://reviews.llvm.org/D138934
2022-12-02[mlir] Factor more common utils to IndexingUtilsHanhan Wang
Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D139159
2022-11-15Apply clang-tidy fixes for llvm-qualified-auto in TileUsingInterface.cpp (NFC)Mehdi Amini
2022-11-04[mlir][tiling] Relax tiling to accept generating multiple operations.Hanhan Wang
Some operations need to generate multiple operations when implementing the tiling interface. Here is a sound example in IREE, see https://github.com/iree-org/iree/pull/10905 for more details. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D137300
2022-11-03[mlir][linalg] Add reduction tiling transformationThomas Raoux
Add a transformation to tile reduction ops into a parallel operation followed by a merge operation. This is equivalent to the existing reduction spliting transformation but using loops instead of using higher dimensions linalg. Differential Revision: https://reviews.llvm.org/D136586
2022-11-01[mlir][Linalg] Drop usage of tileWithLinalgTilingOptions in the ↵Nicolas Vasilache
structured.tile transform This is on a path to deprecation. Context: https://discourse.llvm.org/t/psa-retire-tileandfuselinalgops-method/63850 As the interface-based transformation is more generic, some additional folding of AffineMin/MaxOp and some extra canonicalizations are needed. This can be further evolved. Differential Revision: https://reviews.llvm.org/D137195
2022-10-28[mlir][scf] Enhance sizes computation in tileUsingSCFForOp.Hanhan Wang
The boundary is always 1 if the tile size is 1. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D136884
2022-10-28[mlir] Rename getInputs->getDpsInputs and getOutputs->getDpsInits in DPS ↵Alexander Belyaev
interface. https://discourse.llvm.org/t/rfc-interface-for-destination-style-ops/64056 Differential Revision: https://reviews.llvm.org/D136943
2022-10-24[mlir][interfaces] Remove getDestinationOperands from TilingInterfaceMatthias Springer
`getDestinationOperands` was almost a duplicate of `DestinationStyleOpInterface::getOutputOperands`. Now that the interface has been moved to mlir/Interfaces, it is no longer needed. Differential Revision: https://reviews.llvm.org/D136240
2022-10-12Apply clang-tidy fixes for performance-unnecessary-value-param in ↵Mehdi Amini
TileUsingInterface.cpp (NFC)
2022-10-12Apply clang-tidy fixes for performance-for-range-copy in ↵Mehdi Amini
TileUsingInterface.cpp (NFC)
2022-10-10[mlir][Linalg] Retire LinalgStrategyTileAndFusePass and filter-based pattern.Nicolas Vasilache
Context: https://discourse.llvm.org/t/psa-retire-linalg-filter-based-patterns/63785 In the process, also retire `tileConsumerAndFuseProducers` that is now replaced by `tileConsumerAndFuseProducerGreedilyUsingSCFForOp`. Context: https://discourse.llvm.org/t/psa-retire-tileandfuselinalgops-method/63850 When performing this replacement, a change of behavior appeared: the older `tileConsumerAndFuseProducers` would split the parallel and non-parallel dimensions automatically and perform a first level of tile-and-fuse on parallel dimensions only and then introduce a second level of tiling-only on the reduction dimensions. The newer `tileConsumerAndFuseProducerGreedilyUsingSCFForOp` on the other hand does not perform this breakdown. As a consequence, the transform specification is evolved to produce the same output. Additionally, replace some uses of `unsigned` by `int64_t` where possible without pulling in larger interface changes (left for a future PR). Context: https://www.youtube.com/watch?v=Puio5dly9N8 Lastly, tests that were performing tile and fuse and distribute on tensors are retired: the generated IR mixing scf.for, tensors and distributed processor ids was racy at best .. Differential Revision: https://reviews.llvm.org/D135559
2022-09-30[mlir][SCF] Apply ClangTidyPerformance finding (NFC)Adrian Kuegel
2022-09-29[mlir][arith] Change dialect name from Arithmetic to ArithJakub Kuderski
Suggested by @lattner in https://discourse.llvm.org/t/rfc-define-precise-arith-semantics/65507/22. Tested with: `ninja check-mlir check-mlir-integration check-mlir-mlir-spirv-cpu-runner check-mlir-mlir-vulkan-runner check-mlir-examples` and `bazel build --config=generic_clang @llvm-project//mlir:all`. Reviewed By: lattner, Mogball, rriddle, jpienaar, mehdi_amini Differential Revision: https://reviews.llvm.org/D134762
2022-09-28[mlir][TilingInterface] NFC Refactor of tile and fuse using `TilingInterface`.Mahesh Ravishankar
This patch refactors the tiling and tile + fuse implementation using `TilingInterface`. Primarily, it exposes the functionality as simple utility functions instead of as a Pattern to allow calling it from a pattern as it is done in the test today or from within the transform dialect (in the future). This is a step towards deprecating similar methods in Linalg dialect. - The utility methods do not erase the root operations. - The return value provides the values to use for replacements. Differential Revision: https://reviews.llvm.org/D134144
2022-09-26[mlir][TilingInterface] Fix `iter_args` handling in tile (and fuse).Mahesh Ravishankar
The current approach for handling `iter_args` was to replace all uses of the value that is used as `init` value with the corresponding region block argument within the `scf.for`. This is not always correct. Instead a more deliberate approach needs to be taken to handle these. If the slice being fused represents a slice of the destination operand of the untiled op, then - Make the destination of the fused producer the `init` value of the loop nest - For the tiled and fused producer op created, replace the slice of the destination operand with a slice of the corresponding region iter arg of the innermost loop of the generated loop nest Differential Revision: https://reviews.llvm.org/D134411
2022-09-07Apply clang-tidy fixes for performance-for-range-copy in ↵Mehdi Amini
TileUsingInterface.cpp (NFC)