MLIR: lib/Transforms/SCCP.cpp File Reference (original) (raw)
Go to the source code of this file.
Namespaces |
---|
Functions | |
---|---|
static LogicalResult | replaceWithConstant (DataFlowSolver &solver, OpBuilder &builder, OperationFolder &folder, Value value) |
Replace the given value with a constant if the corresponding lattice represents a constant. More... | |
static void | rewrite (DataFlowSolver &solver, MLIRContext *context, MutableArrayRef< Region > initialRegions) |
Rewrite the given regions using the computing analysis. More... | |
◆ GEN_PASS_DEF_SCCP
#define GEN_PASS_DEF_SCCP
◆ replaceWithConstant()
◆ rewrite()
Rewrite the given regions using the computing analysis.
This replaces the uses of all values that have been computed to be constant, and erases as many newly dead operations.
Definition at line 67 of file SCCP.cpp.
References mlir::Block::getArguments(), replaceWithConstant(), mlir::OpBuilder::setInsertionPoint(), mlir::OpBuilder::setInsertionPointToStart(), and mlir::wouldOpBeTriviallyDead().
Referenced by mlir::detail::ConversionPatternRewriterImpl::applyRewrites(), mlir::ConversionPatternRewriter::cancelOpModification(), checkAndNestUnderRewriteOp(), mlir::LLVMTypeConverter::convertType(), legalizeUnresolvedMaterialization(), and mlir::detail::ConversionPatternRewriterImpl::undoRewrites().