|
MLIR 22.0.0git
|
#include "mlir/Dialect/SCF/IR/SCF.h"#include "mlir/Conversion/ConvertToEmitC/ToEmitCInterface.h"#include "mlir/Dialect/Arith/IR/Arith.h"#include "mlir/Dialect/Arith/Utils/Utils.h"#include "mlir/Dialect/Bufferization/IR/BufferDeallocationOpInterface.h"#include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"#include "mlir/Dialect/MemRef/IR/MemRef.h"#include "mlir/Dialect/SCF/IR/DeviceMappingInterface.h"#include "mlir/Dialect/Tensor/IR/Tensor.h"#include "mlir/IR/BuiltinAttributes.h"#include "mlir/IR/IRMapping.h"#include "mlir/IR/Matchers.h"#include "mlir/IR/Operation.h"#include "mlir/IR/OperationSupport.h"#include "mlir/IR/PatternMatch.h"#include "mlir/Interfaces/FunctionInterfaces.h"#include "mlir/Interfaces/ParallelCombiningOpInterface.h"#include "mlir/Interfaces/ValueBoundsOpInterface.h"#include "mlir/Transforms/InliningUtils.h"#include "llvm/ADT/MapVector.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/Support/Casting.h"#include "llvm/Support/DebugLog.h"#include <optional>#include "mlir/Dialect/SCF/IR/SCFOpsDialect.cpp.inc"#include "mlir/Dialect/SCF/IR/SCFOps.cpp.inc"Go to the source code of this file.
Classes | |
| struct | SingleBlockExecuteInliner |
| struct | MultiBlockExecuteInliner |
| struct | ExecuteRegionForwardingEliminator |
| struct | FoldConstantCase |
Macros | |
| #define | GET_OP_LIST |
| #define | GET_OP_CLASSES |
Functions | |
| template<typename TerminatorTy> | |
| static TerminatorTy | verifyAndGetTerminator (Operation *op, Region ®ion, StringRef errorMessage) |
| Verifies that the first block of the given region is terminated by a TerminatorTy. | |
| static void | replaceOpWithRegion (PatternRewriter &rewriter, Operation *op, Region ®ion, ValueRange blockArgs={}) |
| Replaces the given op with the contents of the given single-block region, using the operands of the block terminator to replace operation results. | |
| static void | printInitializationList (OpAsmPrinter &p, Block::BlockArgListType blocksArgs, ValueRange initializers, StringRef prefix="") |
| Prints the initialization list in the form of <prefix>(inner = outer, inner2 = outer2, <...>) where 'inner' values are assumed to be region arguments and 'outer' values are regular SSA values. | |
| template<typename OpTy> | |
| static LogicalResult | verifyTypeRangesMatch (OpTy op, TypeRange left, TypeRange right, StringRef message) |
| Verifies that two ranges of types match, i.e. | |
| static ParseResult | parseSwitchCases (OpAsmParser &p, DenseI64ArrayAttr &cases, SmallVectorImpl< std::unique_ptr< Region > > &caseRegions) |
| Parse the case regions and values. | |
| static void | printSwitchCases (OpAsmPrinter &p, Operation *op, DenseI64ArrayAttr cases, RegionRange caseRegions) |
| Print the case regions and values. | |
| #define GET_OP_LIST |
|
static |
Parse the case regions and values.
Definition at line 4411 of file SCF.cpp.
References mlir::AsmParser::getBuilder(), mlir::Builder::getDenseI64ArrayAttr(), mlir::AsmParser::parseInteger(), mlir::AsmParser::parseOptionalKeyword(), mlir::OpAsmParser::parseRegion(), and success().
|
static |
|
static |
Print the case regions and values.
Definition at line 4426 of file SCF.cpp.
References mlir::detail::DenseArrayAttrImpl< T >::asArrayRef(), mlir::OpAsmPrinter::printNewline(), and mlir::OpAsmPrinter::printRegion().
|
static |
Replaces the given op with the contents of the given single-block region, using the operands of the block terminator to replace operation results.
Definition at line 136 of file SCF.cpp.
Referenced by SingleBlockExecuteInliner::matchAndRewrite().
|
static |
Verifies that the first block of the given region is terminated by a TerminatorTy.
Reports errors on the given operation if it is not the case.
Definition at line 100 of file SCF.cpp.
References mlir::Block::back(), diag(), mlir::Operation::emitOpError(), mlir::Block::empty(), mlir::Region::empty(), mlir::Region::front(), and mlir::Operation::getLoc().