26 #define GEN_PASS_DEF_TOSATOSCF
27 #include "mlir/Conversion/Passes.h.inc"
34 struct TosaToSCF :
public impl::TosaToSCFBase<TosaToSCF> {
36 void runOnOperation()
override {
40 target.
addIllegalOp<tosa::IfOp, tosa::ScatterOp, tosa::WhileOp>();
43 auto *op = getOperation();
52 return std::make_unique<TosaToSCF>();
static MLIRContext * getContext(OpFoldResult val)
This class describes a specific conversion target.
void addLegalDialect(StringRef name, Names... names)
Register the operations of the given dialects as legal.
void markUnknownOpDynamicallyLegal(const DynamicLegalityCallbackFn &fn)
Register unknown operations as dynamically legal.
void addIllegalOp(OperationName op)
Register the given operation as illegal, i.e.
This class represents a pass manager that runs passes on either a specific operation type,...
void addNestedPass(std::unique_ptr< Pass > pass)
Add the given pass to a nested pass manager for the given operation kind OpT.
Operation is the basic unit of execution within MLIR.
void addTosaToSCFPasses(OpPassManager &pm)
Populates passes to convert from TOSA to SCF.
void populateTosaToSCFConversionPatterns(RewritePatternSet *patterns)
std::unique_ptr< Pass > createTosaToSCF()
Include the generated interface declarations.
LogicalResult applyPartialConversion(ArrayRef< Operation * > ops, const ConversionTarget &target, const FrozenRewritePatternSet &patterns, ConversionConfig config=ConversionConfig())
Below we define several entry points for operation conversion.