15 #ifndef MLIR_DIALECT_LLVMIR_TRANSFORMS_TYPECONSISTENCY_H
16 #define MLIR_DIALECT_LLVMIR_TRANSFORMS_TYPECONSISTENCY_H
25 #define GEN_PASS_DECL_LLVMTYPECONSISTENCY
26 #include "mlir/Dialect/LLVMIR/Transforms/Passes.h.inc"
61 unsigned maxVectorSplitSize;
Transforms uses of pointers to a whole struct to uses of pointers to the first element of a struct.
LogicalResult matchAndRewrite(User user, PatternRewriter &rewriter) const override
Transforms type-inconsistent stores, aka stores where the type hint of the address contradicts the va...
LogicalResult matchAndRewrite(StoreOp store, PatternRewriter &rewriter) const override
Canonicalizes GEPs of which the base type and the pointer's type hint do not match.
LogicalResult matchAndRewrite(GEPOp gep, PatternRewriter &rewriter) const override
Splits GEPs with more than two indices into multiple GEPs with exactly two indices.
LogicalResult matchAndRewrite(GEPOp gepOp, PatternRewriter &rewriter) const override
Splits stores which write into multiple adjacent elements of an aggregate through a pointer.
SplitStores(MLIRContext *context, unsigned maxVectorSplitSize)
LogicalResult matchAndRewrite(StoreOp store, PatternRewriter &rewrite) const override
MLIRContext is the top-level object for a collection of MLIR operations.
A special type of RewriterBase that coordinates the application of a rewrite pattern on the current I...
std::unique_ptr< Pass > createTypeConsistencyPass()
Creates a pass that adjusts operations operating on pointers so they interpret pointee types as consi...
Include the generated interface declarations.
This class represents an efficient way to signal success or failure.
OpRewritePattern is a wrapper around RewritePattern that allows for matching and rewriting against an...
OpRewritePattern(MLIRContext *context, PatternBenefit benefit=1, ArrayRef< StringRef > generatedNames={})
Patterns must specify the root operation name they match against, and can also specify the benefit of...
void rewrite(Operation *op, PatternRewriter &rewriter) const final
Wrappers around the RewritePattern methods that pass the derived op type.