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);
47 const std::function<
bool(mlir::Location)> &pred);
51std::unique_ptr<mlir::Pass>
53 ArrayRef<unsigned> bankingDimensions = {});
56 const std::string &topName,
57 llvm::function_ref<
void(mlir::OpPassManager &)>
pipeline,
58 bool includeBoundInstances =
false);
98LogicalResult
maximizeSSA(Value value, PatternRewriter &rewriter);
107 PatternRewriter &rewriter);
117 PatternRewriter &rewriter);
126 PatternRewriter &rewriter);
133 mlir::ConversionPatternRewriter &rewriter);
140#define GEN_PASS_REGISTRATION
141#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)
std::unique_ptr< mlir::Pass > createConvertIndexToUIntPass()
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.