MLIR  19.0.0git
LoopExtensionOps.cpp
Go to the documentation of this file.
1 //===- LoopExtensionOps.cpp - Loop extension for the Transform dialect ----===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
12 #include "mlir/IR/PatternMatch.h"
14 
15 using namespace mlir;
16 
17 #define GET_OP_CLASSES
18 #include "mlir/Dialect/Transform/LoopExtension/LoopExtensionOps.cpp.inc"
19 
20 //===----------------------------------------------------------------------===//
21 // HoistLoopInvariantSubsetsOp
22 //===----------------------------------------------------------------------===//
23 
24 DiagnosedSilenceableFailure transform::HoistLoopInvariantSubsetsOp::applyToOne(
25  transform::TransformRewriter &rewriter, LoopLikeOpInterface loopLikeOp,
28  hoistLoopInvariantSubsets(rewriter, loopLikeOp);
30 }
31 
32 void transform::HoistLoopInvariantSubsetsOp::getEffects(
34  transform::onlyReadsHandle(getTarget(), effects);
36 }
The result of a transform IR operation application.
static DiagnosedSilenceableFailure success()
Constructs a DiagnosedSilenceableFailure in the success state.
A list of results of applying a transform op with ApplyEachOpTrait to a single payload operation,...
This is a special rewriter to be used in transform op implementations, providing additional helper fu...
The state maintained across applications of various ops implementing the TransformOpInterface.
void onlyReadsHandle(ValueRange handles, SmallVectorImpl< MemoryEffects::EffectInstance > &effects)
void modifiesPayload(SmallVectorImpl< MemoryEffects::EffectInstance > &effects)
Populates effects with the memory effects indicating the access to payload IR resource.
Include the generated interface declarations.
LoopLikeOpInterface hoistLoopInvariantSubsets(RewriterBase &rewriter, LoopLikeOpInterface loopLike)
Hoist loop-invariant tensor subsets (subset extraction and subset insertion ops) from loop-like ops.