#include "mlir/Analysis/DataFlow/SparseAnalysis.h"
#include "mlir/Analysis/DataFlow/DeadCodeAnalysis.h"
#include "mlir/Analysis/DataFlowFramework.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/Region.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/ADT/STLExtras.h"
#include "llvm/Support/Casting.h"
#include <cassert>
#include <optional>
usingnamespacemlir;
usingnamespacemlir::dataflow;
void AbstractSparseLattice::onUpdate(DataFlowSolver *solver) const { … }
AbstractSparseForwardDataFlowAnalysis::AbstractSparseForwardDataFlowAnalysis(
DataFlowSolver &solver)
: … { … }
LogicalResult
AbstractSparseForwardDataFlowAnalysis::initialize(Operation *top) { … }
LogicalResult
AbstractSparseForwardDataFlowAnalysis::initializeRecursively(Operation *op) { … }
LogicalResult
AbstractSparseForwardDataFlowAnalysis::visit(ProgramPoint *point) { … }
LogicalResult
AbstractSparseForwardDataFlowAnalysis::visitOperation(Operation *op) { … }
void AbstractSparseForwardDataFlowAnalysis::visitBlock(Block *block) { … }
void AbstractSparseForwardDataFlowAnalysis::visitRegionSuccessors(
ProgramPoint *point, RegionBranchOpInterface branch,
RegionBranchPoint successor, ArrayRef<AbstractSparseLattice *> lattices) { … }
const AbstractSparseLattice *
AbstractSparseForwardDataFlowAnalysis::getLatticeElementFor(ProgramPoint *point,
Value value) { … }
void AbstractSparseForwardDataFlowAnalysis::setAllToEntryStates(
ArrayRef<AbstractSparseLattice *> lattices) { … }
void AbstractSparseForwardDataFlowAnalysis::join(
AbstractSparseLattice *lhs, const AbstractSparseLattice &rhs) { … }
AbstractSparseBackwardDataFlowAnalysis::AbstractSparseBackwardDataFlowAnalysis(
DataFlowSolver &solver, SymbolTableCollection &symbolTable)
: … { … }
LogicalResult
AbstractSparseBackwardDataFlowAnalysis::initialize(Operation *top) { … }
LogicalResult
AbstractSparseBackwardDataFlowAnalysis::initializeRecursively(Operation *op) { … }
LogicalResult
AbstractSparseBackwardDataFlowAnalysis::visit(ProgramPoint *point) { … }
SmallVector<AbstractSparseLattice *>
AbstractSparseBackwardDataFlowAnalysis::getLatticeElements(ValueRange values) { … }
SmallVector<const AbstractSparseLattice *>
AbstractSparseBackwardDataFlowAnalysis::getLatticeElementsFor(
ProgramPoint *point, ValueRange values) { … }
static MutableArrayRef<OpOperand> operandsToOpOperands(OperandRange &operands) { … }
LogicalResult
AbstractSparseBackwardDataFlowAnalysis::visitOperation(Operation *op) { … }
void AbstractSparseBackwardDataFlowAnalysis::visitRegionSuccessors(
RegionBranchOpInterface branch,
ArrayRef<AbstractSparseLattice *> operandLattices) { … }
void AbstractSparseBackwardDataFlowAnalysis::
visitRegionSuccessorsFromTerminator(
RegionBranchTerminatorOpInterface terminator,
RegionBranchOpInterface branch) { … }
const AbstractSparseLattice *
AbstractSparseBackwardDataFlowAnalysis::getLatticeElementFor(
ProgramPoint *point, Value value) { … }
void AbstractSparseBackwardDataFlowAnalysis::setAllToExitStates(
ArrayRef<AbstractSparseLattice *> lattices) { … }
void AbstractSparseBackwardDataFlowAnalysis::meet(
AbstractSparseLattice *lhs, const AbstractSparseLattice &rhs) { … }