MLIR
17.0.0git
|
#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"
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 ®ion, 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 ®ion) |
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... | |
|
static |
Returns true if the predecessor terminators of the given block can not have their operands updated.
Definition at line 570 of file RegionUtils.cpp.
References mlir::Block::pred_begin(), and mlir::Block::pred_end().
|
static |
Definition at line 309 of file RegionUtils.cpp.
References mlir::Region::empty(), mlir::RewriterBase::eraseOp(), eraseTerminatorSuccessorOperands(), mlir::Region::front(), mlir::Region::getBlocks(), mlir::succeeded(), and mlir::success().
Referenced by mlir::runRegionDCE().
|
static |
Definition at line 283 of file RegionUtils.cpp.
References mlir::SuccessorOperands::erase(), mlir::Block::getArgument(), mlir::Operation::getNumSuccessors(), mlir::Operation::getSuccessor(), and mlir::SuccessorOperands::size().
Referenced by deleteDeadness().
|
static |
Definition at line 178 of file RegionUtils.cpp.
References mlir::OpOperand::getOperandNumber(), mlir::detail::IROperandBase::getOwner(), and mlir::Operation::hasTrait().
|
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().
|
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().
|
static |
Definition at line 201 of file RegionUtils.cpp.
References mlir::Value::getUses().
Referenced by propagateLiveness().
|
static |
Definition at line 237 of file RegionUtils.cpp.
References mlir::Operation::getRegions(), mlir::Operation::getResults(), mlir::Operation::hasTrait(), processValue(), propagateLiveness(), propagateTerminatorLiveness(), and mlir::wouldOpBeTriviallyDead().
|
static |
Definition at line 259 of file RegionUtils.cpp.
References mlir::Region::empty(), mlir::Region::front(), and processValue().
Referenced by propagateLiveness(), and mlir::runRegionDCE().
|
static |
Definition at line 213 of file RegionUtils.cpp.
References mlir::Block::getArgument(), mlir::Operation::getNumSuccessors(), mlir::SuccessorOperands::getProducedOperandCount(), mlir::Operation::getSuccessor(), and mlir::Operation::getSuccessors().
Referenced by propagateLiveness().