13#ifndef CIRCT_TRANSFORMS_PASSES_H
14#define CIRCT_TRANSFORMS_PASSES_H
17#include "mlir/Dialect/Affine/IR/AffineOps.h"
18#include "mlir/IR/BuiltinOps.h"
19#include "mlir/Pass/Pass.h"
37#include "circt/Transforms/Passes.h.inc"
40 TypeConverter &typeConverter);
46 const std::function<
bool(mlir::Location)> &pred);
50std::unique_ptr<mlir::Pass>
52 ArrayRef<unsigned> bankingDimensions = {});
55 const std::string &topName,
56 llvm::function_ref<
void(mlir::OpPassManager &)> pipeline,
57 bool includeBoundInstances =
false);
97LogicalResult
maximizeSSA(Value value, PatternRewriter &rewriter);
106 PatternRewriter &rewriter);
116 PatternRewriter &rewriter);
125 PatternRewriter &rewriter);
132 mlir::ConversionPatternRewriter &rewriter);
139#define GEN_PASS_REGISTRATION
140#include "circt/Transforms/Passes.h.inc"
Strategy class to control the behavior of SSA maximization.
virtual bool maximizeResult(OpResult res)
Determines whether an operation's result should be SSA maximized.
virtual ~SSAMaximizationStrategy()=default
virtual bool maximizeArgument(BlockArgument arg)
Determines whether a block argument should be SSA maximized.
virtual bool maximizeBlock(Block *block)
Determines whether a block should have the values it defines (i.e., block arguments and operation res...
virtual bool maximizeOp(Operation *op)
Determines whether an operation should have its results SSA maximized.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
std::unique_ptr< mlir::Pass > createMaximizeSSAPass()
std::unique_ptr< mlir::Pass > createPrintOpCountPass()
std::unique_ptr< mlir::Pass > createHierarchicalRunner(const std::string &topName, llvm::function_ref< void(mlir::OpPassManager &)> pipeline, bool includeBoundInstances=false)
std::unique_ptr< mlir::Pass > createInsertMergeBlocksPass()
std::unique_ptr< mlir::Pass > createIndexSwitchToIfPass()
std::unique_ptr< mlir::Pass > createMemoryBankingPass(ArrayRef< unsigned > bankingFactors={}, ArrayRef< unsigned > bankingDimensions={})
void populateArithToCombPatterns(mlir::RewritePatternSet &patterns, TypeConverter &typeConverter)
std::unique_ptr< mlir::Pass > createMapArithToCombPass()
mlir::LogicalResult insertMergeBlocks(mlir::Region &r, mlir::ConversionPatternRewriter &rewriter)
Insert additional blocks that serve as counterparts to the blocks that diverged the control flow.
LogicalResult maximizeSSA(Value value, PatternRewriter &rewriter)
Converts a single value within a function into maximal SSA form.
std::unique_ptr< mlir::Pass > createFlattenMemRefPass()
bool isUniDimensional(mlir::MemRefType memref)
bool isRegionSSAMaximized(Region ®ion)
std::unique_ptr< mlir::Pass > createFlattenMemRefCallsPass()
std::unique_ptr< mlir::Pass > createStripDebugInfoWithPredPass(const std::function< bool(mlir::Location)> &pred)
Creates a pass to strip debug information from a function.