MLIR
20.0.0git
|
#include "mlir/Dialect/SCF/IR/SCF.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/PatternMatch.h"
#include "mlir/Interfaces/FunctionInterfaces.h"
#include "mlir/Interfaces/ValueBoundsOpInterface.h"
#include "mlir/Transforms/InliningUtils.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/TypeSwitch.h"
#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 | 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. More... | |
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. More... | |
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. More... | |
template<typename OpTy > | |
static LogicalResult | verifyTypeRangesMatch (OpTy op, TypeRange left, TypeRange right, StringRef message) |
Verifies that two ranges of types match, i.e. More... | |
static ParseResult | parseSwitchCases (OpAsmParser &p, DenseI64ArrayAttr &cases, SmallVectorImpl< std::unique_ptr< Region >> &caseRegions) |
Parse the case regions and values. More... | |
static void | printSwitchCases (OpAsmPrinter &p, Operation *op, DenseI64ArrayAttr cases, RegionRange caseRegions) |
Print the case regions and values. More... | |
#define GET_OP_LIST |
|
static |
Parse the case regions and values.
Definition at line 4190 of file SCF.cpp.
References mlir::AsmParser::getBuilder(), mlir::Builder::getDenseI64ArrayAttr(), mlir::AsmParser::parseInteger(), mlir::AsmParser::parseOptionalKeyword(), and mlir::OpAsmParser::parseRegion().
|
static |
|
static |
Print the case regions and values.
Definition at line 4205 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 112 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 92 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().