MLIR  16.0.0git
Functions
RegionUtils.cpp File Reference
#include "mlir/Transforms/RegionUtils.h"
#include "mlir/IR/Block.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/RegionGraphTraits.h"
#include "mlir/IR/Value.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SmallSet.h"
+ Include dependency graph for RegionUtils.cpp:

Go to the source code of this file.

Functions

static bool isUseSpeciallyKnownDead (OpOperand &use, LiveMap &liveMap)
 
static void processValue (Value value, LiveMap &liveMap)
 
static void propagateLiveness (Region &region, LiveMap &liveMap)
 
static void propagateTerminatorLiveness (Operation *op, LiveMap &liveMap)
 
static void propagateLiveness (Operation *op, LiveMap &liveMap)
 
static void eraseTerminatorSuccessorOperands (Operation *terminator, LiveMap &liveMap)
 
static LogicalResult deleteDeadness (RewriterBase &rewriter, MutableArrayRef< Region > regions, LiveMap &liveMap)
 
static bool ableToUpdatePredOperands (Block *block)
 Returns true if the predecessor terminators of the given block can not have their operands updated. More...
 
static LogicalResult mergeIdenticalBlocks (RewriterBase &rewriter, Region &region)
 Identify identical blocks within the given region and merge them, inserting new block arguments as necessary. More...
 
static LogicalResult mergeIdenticalBlocks (RewriterBase &rewriter, MutableArrayRef< Region > regions)
 Identify identical blocks within the given regions and merge them, inserting new block arguments as necessary. More...
 

Function Documentation

◆ ableToUpdatePredOperands()

static bool ableToUpdatePredOperands ( Block block)
static

◆ deleteDeadness()

static LogicalResult deleteDeadness ( RewriterBase rewriter,
MutableArrayRef< Region regions,
LiveMap &  liveMap 
)
static

◆ eraseTerminatorSuccessorOperands()

static void eraseTerminatorSuccessorOperands ( Operation terminator,
LiveMap &  liveMap 
)
static

◆ isUseSpeciallyKnownDead()

static bool isUseSpeciallyKnownDead ( OpOperand use,
LiveMap &  liveMap 
)
static

◆ mergeIdenticalBlocks() [1/2]

static LogicalResult mergeIdenticalBlocks ( RewriterBase rewriter,
Region region 
)
static

Identify identical blocks within the given region and merge them, inserting new block arguments as necessary.

Returns success if any blocks were merged, failure otherwise.

Definition at line 652 of file RegionUtils.cpp.

References mlir::Region::empty(), mlir::failure(), mlir::Operation::getRegions(), mlir::Block::getSuccessors(), mlir::succeeded(), and mlir::success().

Referenced by mergeIdenticalBlocks(), and mlir::simplifyRegions().

◆ mergeIdenticalBlocks() [2/2]

static LogicalResult mergeIdenticalBlocks ( RewriterBase rewriter,
MutableArrayRef< Region regions 
)
static

Identify identical blocks within the given regions and merge them, inserting new block arguments as necessary.

Definition at line 699 of file RegionUtils.cpp.

References mergeIdenticalBlocks(), mlir::succeeded(), and mlir::success().

◆ processValue()

static void processValue ( Value  value,
LiveMap &  liveMap 
)
static

◆ propagateLiveness() [1/2]

static void propagateLiveness ( Region region,
LiveMap &  liveMap 
)
static

◆ propagateLiveness() [2/2]

static void propagateLiveness ( Operation op,
LiveMap &  liveMap 
)
static

◆ propagateTerminatorLiveness()

static void propagateTerminatorLiveness ( Operation op,
LiveMap &  liveMap 
)
static