MLIR  19.0.0git
Namespaces | Macros | Typedefs | Functions
Mem2Reg.cpp File Reference
#include "mlir/Transforms/Mem2Reg.h"
#include "mlir/Analysis/DataLayoutAnalysis.h"
#include "mlir/Analysis/SliceAnalysis.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Dominance.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/Value.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h"
#include "mlir/Interfaces/MemorySlotInterfaces.h"
#include "mlir/Transforms/Passes.h"
#include "mlir/Transforms/RegionUtils.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/GenericIteratedDominanceFrontier.h"
#include "mlir/Transforms/Passes.h.inc"

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 

Macros

#define GEN_PASS_DEF_MEM2REG
 
#define DEBUG_TYPE   "mem2reg"
 

Typedefs

using IDFCalculator = llvm::IDFCalculatorBase< Block, false >
 

Functions

static void dominanceSort (SmallVector< Operation * > &ops, Region &region)
 Sorts ops according to dominance. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "mem2reg"

Definition at line 29 of file Mem2Reg.cpp.

◆ GEN_PASS_DEF_MEM2REG

#define GEN_PASS_DEF_MEM2REG

Definition at line 25 of file Mem2Reg.cpp.

Typedef Documentation

◆ IDFCalculator

using IDFCalculator = llvm::IDFCalculatorBase<Block, false>

Definition at line 369 of file Mem2Reg.cpp.

Function Documentation

◆ dominanceSort()

static void dominanceSort ( SmallVector< Operation * > &  ops,
Region region 
)
static

Sorts ops according to dominance.

Relies on the topological order of basic blocks to get a deterministic ordering.

Definition at line 532 of file Mem2Reg.cpp.

References mlir::detail::enumerate(), mlir::Operation::getBlock(), getTopologicallySortedBlocks(), and mlir::Operation::isBeforeInBlock().