MLIR
17.0.0git
|
#include "mlir/Analysis/DataFlow/DeadCodeAnalysis.h"
#include "mlir/Analysis/DataFlow/ConstantPropagationAnalysis.h"
#include "mlir/Interfaces/CallInterfaces.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h"
#include <optional>
Go to the source code of this file.
Functions | |
static bool | isRegionOrCallableReturn (Operation *op) |
Returns true if the operation is a returning terminator in region control-flow or the terminator of a callable region. More... | |
static std::optional< SmallVector< Attribute > > | getOperandValuesImpl (Operation *op, function_ref< const Lattice< ConstantValue > *(Value)> getLattice) |
Get the constant values of the operands of an operation. More... | |
|
static |
Get the constant values of the operands of an operation.
If any of the constant value lattices are uninitialized, return none to indicate the analysis should bail out.
Definition at line 314 of file DeadCodeAnalysis.cpp.
References mlir::Operation::getNumOperands(), mlir::Operation::getOperands(), and mlir::dataflow::Lattice< ValueT >::getValue().
|
static |
Returns true if the operation is a returning terminator in region control-flow or the terminator of a callable region.
Definition at line 177 of file DeadCodeAnalysis.cpp.
References mlir::Operation::getBlock(), mlir::Operation::getNumSuccessors(), mlir::Operation::getParentOp(), and mlir::Block::getTerminator().
Referenced by mlir::dataflow::DeadCodeAnalysis::visit().