mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 06:10:12 +00:00
[mlir] NFC: Expose tiled_loop->scf pattern.
Differential Revision: https://reviews.llvm.org/D102921
This commit is contained in:
parent
cc5f6ae4b4
commit
335fa18028
@ -81,6 +81,9 @@ void populateFoldUnitExtentDimsPatterns(RewritePatternSet &patterns);
|
||||
/// Patterns that are used to inline constant operands into linalg generic ops.
|
||||
void populateInlineConstantOperandsPatterns(RewritePatternSet &patterns);
|
||||
|
||||
/// Pattern to convert TiledLoopOp to SCF loops.
|
||||
void populateTiledLoopToSCFPattern(RewritePatternSet &patterns);
|
||||
|
||||
/// Options that control fusion of elementwise operations.
|
||||
struct LinalgElementwiseFusionOptions {
|
||||
/// Enable fusion of reshapes into the shape with elementwise operations. By
|
||||
|
@ -597,12 +597,16 @@ struct LowerTiledLoopsToSCF
|
||||
void runOnFunction() override {
|
||||
MLIRContext *context = &getContext();
|
||||
RewritePatternSet patterns(context);
|
||||
patterns.add<TiledLoopToSCFPattern>(context);
|
||||
populateTiledLoopToSCFPattern(patterns);
|
||||
(void)applyPatternsAndFoldGreedily(getFunction(), std::move(patterns));
|
||||
}
|
||||
};
|
||||
} // namespace
|
||||
|
||||
void mlir::linalg::populateTiledLoopToSCFPattern(RewritePatternSet &patterns) {
|
||||
patterns.add<TiledLoopToSCFPattern>(patterns.getContext());
|
||||
}
|
||||
|
||||
std::unique_ptr<OperationPass<FuncOp>>
|
||||
mlir::createConvertLinalgTiledLoopsToSCFPass() {
|
||||
return std::make_unique<LowerTiledLoopsToSCF>();
|
||||
|
Loading…
Reference in New Issue
Block a user