24 #define GEN_PASS_DEF_TOSATOARITH
25 #include "mlir/Conversion/Passes.h.inc"
32 struct TosaToArith :
public impl::TosaToArithBase<TosaToArith> {
34 TosaToArith(TosaToArithOptions &
options) : TosaToArithBase(
options) {}
36 void runOnOperation()
override {
44 if (this->includeApplyRescale) {
51 std::move(patterns))))
58 bool use32BitApplyRescale) {
59 TosaToArithOptions
options = {includeApplyRescale, use32BitApplyRescale};
60 return std::make_unique<TosaToArith>(
options);
static MLIRContext * getContext(OpFoldResult val)
static llvm::ManagedStatic< PassManagerOptions > options
This class describes a specific conversion target.
void addLegalDialect(StringRef name, Names... names)
Register the operations of the given dialects as legal.
void addIllegalOp(OperationName op)
Register the given operation as illegal, i.e.
std::unique_ptr< Pass > createTosaToArith(bool includeApplyRescale=false, bool use32BitApplyRescale=false)
void populateTosaRescaleToArithConversionPatterns(RewritePatternSet *patterns, bool include32Bit=false)
void populateTosaToArithConversionPatterns(RewritePatternSet *patterns)
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.