MLIR
19.0.0git
|
#include "mlir/Transforms/RegionUtils.h"
#include "mlir/IR/Block.h"
#include "mlir/IR/IRMapping.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 "mlir/Transforms/TopologicalSortUtils.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SmallSet.h"
#include <deque>
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 670 of file RegionUtils.cpp.
References mlir::Block::pred_begin(), and mlir::Block::pred_end().
|
static |
Definition at line 409 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 383 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 278 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 799 of file RegionUtils.cpp.
References mergeIdenticalBlocks(), and mlir::succeeded().
|
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 752 of file RegionUtils.cpp.
References mlir::Region::empty(), mlir::failure(), and mlir::Block::getSuccessors().
Referenced by mergeIdenticalBlocks(), and mlir::simplifyRegions().
|
static |
Definition at line 301 of file RegionUtils.cpp.
References mlir::Value::getUses().
|
static |
Definition at line 337 of file RegionUtils.cpp.
|
static |
Definition at line 359 of file RegionUtils.cpp.
References mlir::Region::empty(), and mlir::Region::front().
Referenced by mlir::runRegionDCE().
|
static |
Definition at line 313 of file RegionUtils.cpp.