|
MLIR 24.0.0git
|
#include "mlir/Transforms/Mem2Reg.h"#include "mlir/Analysis/DataLayoutAnalysis.h"#include "mlir/Analysis/SliceAnalysis.h"#include "mlir/Analysis/TopologicalSortUtils.h"#include "mlir/IR/Builders.h"#include "mlir/IR/Dominance.h"#include "mlir/IR/PatternMatch.h"#include "mlir/IR/RegionKindInterface.h"#include "mlir/IR/Value.h"#include "mlir/Interfaces/ControlFlowInterfaces.h"#include "mlir/Interfaces/MemorySlotInterfaces.h"#include "mlir/Transforms/Passes.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SetVector.h"#include "llvm/Support/DebugLog.h"#include "llvm/Support/GenericIteratedDominanceFrontier.h"#include "mlir/Transforms/Passes.h.inc"Go to the source code of this file.
Classes | |
| class | mlir::impl::Mem2RegBase< DerivedT > |
Namespaces | |
| namespace | mlir |
| Include the generated interface declarations. | |
| namespace | mlir::impl |
| Attribute collections provide a dictionary-like interface. | |
Macros | |
| #define | GEN_PASS_DEF_MEM2REG |
| #define | DEBUG_TYPE "mem2reg" |
Typedefs | |
| using | IDFCalculator = llvm::IDFCalculatorBase<Block, false> |
Functions | |
| std::unique_ptr<::mlir::Pass > | mlir::impl::createMem2Reg () |
| std::unique_ptr<::mlir::Pass > | mlir::impl::createMem2Reg (Mem2RegOptions options) |
| std::unique_ptr<::mlir::Pass > | mlir::createMem2Reg () |
| std::unique_ptr<::mlir::Pass > | mlir::createMem2Reg (Mem2RegOptions options) |
| static Operation * | getBlockingUseOwner (Operation *op) |
| Returns op's parent if it owns the blocking uses of op as a wrapped access, or op otherwise. | |
| static const DenseMap< Block *, size_t > & | getOrCreateBlockIndices (BlockIndexCache &blockIndexCache, Block *regionEntryBlock) |
| Gets or creates a block index mapping for the region of which the entry block is regionEntryBlock. | |
| static void | dominanceSort (SmallVector< Operation * > &ops, Region ®ion, BlockIndexCache &blockIndexCache) |
| Sorts ops according to dominance. | |
| #define DEBUG_TYPE "mem2reg" |
Definition at line 31 of file Mem2Reg.cpp.
| #define GEN_PASS_DEF_MEM2REG |
Definition at line 27 of file Mem2Reg.cpp.
| using IDFCalculator = llvm::IDFCalculatorBase<Block, false> |
Definition at line 523 of file Mem2Reg.cpp.
|
static |
Sorts ops according to dominance.
Relies on the topological order of basic blocks to get a deterministic ordering. Uses blockIndexCache to avoid the potentially expensive recomputation of a block index map. This function assumes no blocks are ever deleted or entry block changed during the lifetime of the block index cache.
Definition at line 792 of file Mem2Reg.cpp.
References mlir::Region::empty(), mlir::Region::front(), and getOrCreateBlockIndices().
Returns op's parent if it owns the blocking uses of op as a wrapped access, or op otherwise.
Definition at line 360 of file Mem2Reg.cpp.
References mlir::Operation::getParentOp().
|
static |
Gets or creates a block index mapping for the region of which the entry block is regionEntryBlock.
Definition at line 773 of file Mem2Reg.cpp.
References mlir::getBlocksSortedByDominance(), mlir::Block::getParent(), and inserted().
Referenced by dominanceSort().