9 #ifndef MLIR_DIALECT_ARITH_TRANSFORMS_PASSES_H_
10 #define MLIR_DIALECT_ARITH_TRANSFORMS_PASSES_H_
16 class ConversionTarget;
22 #include "mlir/Dialect/Arith/Transforms/Passes.h.inc"
24 class WideIntEmulationConverter;
25 class NarrowTypeEmulationConverter;
34 WideIntEmulationConverter &typeConverter, RewritePatternSet &patterns);
40 NarrowTypeEmulationConverter &typeConverter, RewritePatternSet &patterns);
45 ArrayRef<Type> sourceTypes,
51 TypeConverter &converter);
56 TypeConverter &converter);
72 DataFlowSolver &solver);
79 const ArithIntNarrowingOptions &
options);
86 #define GEN_PASS_REGISTRATION
87 #include "mlir/Dialect/Arith/Transforms/Passes.h.inc"
static llvm::ManagedStatic< PassManagerOptions > options
void populateArithIntNarrowingPatterns(RewritePatternSet &patterns, const ArithIntNarrowingOptions &options)
Add patterns for integer bitwidth narrowing.
void populateExpandBFloat16Patterns(RewritePatternSet &patterns)
Add patterns to expand Arith bf16 patterns to lower level bitcasts/shifts.
void populateArithWideIntEmulationPatterns(WideIntEmulationConverter &typeConverter, RewritePatternSet &patterns)
Adds patterns to emulate wide Arith and Function ops over integer types into supported ones.
void populateEmulateUnsupportedFloatsLegality(ConversionTarget &target, TypeConverter &converter)
Set up a dialect conversion to reject arithmetic operations on unsupported float types.
void populateCeilFloorDivExpandOpsPatterns(RewritePatternSet &patterns)
Add patterns to expand Arith ceil/floor division ops.
std::unique_ptr< Pass > createConstantBufferizePass(uint64_t alignment=0)
Create a pass to bufferize arith.constant ops.
std::unique_ptr< Pass > createIntRangeOptimizationsPass()
Create a pass which do optimizations based on integer range analysis.
void populateArithExpandOpsPatterns(RewritePatternSet &patterns)
Add patterns to expand Arith ops.
void populateIntRangeOptimizationsPatterns(RewritePatternSet &patterns, DataFlowSolver &solver)
Add patterns for int range based optimizations.
void populateEmulateUnsupportedFloatsPatterns(RewritePatternSet &patterns, TypeConverter &converter)
Add rewrite patterns for converting operations that use illegal float types to ones that use legal on...
std::unique_ptr< Pass > createArithUnsignedWhenEquivalentPass()
Create a pass to replace signed ops with unsigned ones where they are proven equivalent.
void populateArithNarrowTypeEmulationPatterns(NarrowTypeEmulationConverter &typeConverter, RewritePatternSet &patterns)
Adds patterns to emulate narrow Arith and Function ops into wide supported types.
void populateEmulateUnsupportedFloatsConversions(TypeConverter &converter, ArrayRef< Type > sourceTypes, Type targetType)
Populate the type conversions needed to emulate the unsupported sourceTypes with destType
Include the generated interface declarations.