#include "mlir/Analysis/DataFlow/DeadCodeAnalysis.h"
#include "mlir/Analysis/DataFlow/ConstantPropagationAnalysis.h"
#include "mlir/Analysis/DataFlow/SparseAnalysis.h"
#include "mlir/Analysis/DataFlowFramework.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Block.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/Location.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/SymbolTable.h"
#include "mlir/IR/Value.h"
#include "mlir/IR/ValueRange.h"
#include "mlir/Interfaces/CallInterfaces.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h"
#include "mlir/Support/LLVM.h"
#include "llvm/Support/Casting.h"
#include <cassert>
#include <optional>
usingnamespacemlir;
usingnamespacemlir::dataflow;
ChangeResult Executable::setToLive() { … }
void Executable::print(raw_ostream &os) const { … }
void Executable::onUpdate(DataFlowSolver *solver) const { … }
void PredecessorState::print(raw_ostream &os) const { … }
ChangeResult PredecessorState::join(Operation *predecessor) { … }
ChangeResult PredecessorState::join(Operation *predecessor, ValueRange inputs) { … }
Location CFGEdge::getLoc() const { … }
void CFGEdge::print(raw_ostream &os) const { … }
DeadCodeAnalysis::DeadCodeAnalysis(DataFlowSolver &solver)
: … { … }
LogicalResult DeadCodeAnalysis::initialize(Operation *top) { … }
void DeadCodeAnalysis::initializeSymbolCallables(Operation *top) { … }
static bool isRegionOrCallableReturn(Operation *op) { … }
LogicalResult DeadCodeAnalysis::initializeRecursively(Operation *op) { … }
void DeadCodeAnalysis::markEdgeLive(Block *from, Block *to) { … }
void DeadCodeAnalysis::markEntryBlocksLive(Operation *op) { … }
LogicalResult DeadCodeAnalysis::visit(ProgramPoint *point) { … }
void DeadCodeAnalysis::visitCallOperation(CallOpInterface call) { … }
static std::optional<SmallVector<Attribute>> getOperandValuesImpl(
Operation *op,
function_ref<const Lattice<ConstantValue> *(Value)> getLattice) { … }
std::optional<SmallVector<Attribute>>
DeadCodeAnalysis::getOperandValues(Operation *op) { … }
void DeadCodeAnalysis::visitBranchOperation(BranchOpInterface branch) { … }
void DeadCodeAnalysis::visitRegionBranchOperation(
RegionBranchOpInterface branch) { … }
void DeadCodeAnalysis::visitRegionTerminator(Operation *op,
RegionBranchOpInterface branch) { … }
void DeadCodeAnalysis::visitCallableTerminator(Operation *op,
CallableOpInterface callable) { … }