llvm/mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp

//===- DeadCodeAnalysis.cpp - Dead code analysis --------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#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;

//===----------------------------------------------------------------------===//
// Executable
//===----------------------------------------------------------------------===//

ChangeResult Executable::setToLive() {}

void Executable::print(raw_ostream &os) const {}

void Executable::onUpdate(DataFlowSolver *solver) const {}

//===----------------------------------------------------------------------===//
// PredecessorState
//===----------------------------------------------------------------------===//

void PredecessorState::print(raw_ostream &os) const {}

ChangeResult PredecessorState::join(Operation *predecessor) {}

ChangeResult PredecessorState::join(Operation *predecessor, ValueRange inputs) {}

//===----------------------------------------------------------------------===//
// CFGEdge
//===----------------------------------------------------------------------===//

Location CFGEdge::getLoc() const {}

void CFGEdge::print(raw_ostream &os) const {}

//===----------------------------------------------------------------------===//
// DeadCodeAnalysis
//===----------------------------------------------------------------------===//

DeadCodeAnalysis::DeadCodeAnalysis(DataFlowSolver &solver)
    :{}

LogicalResult DeadCodeAnalysis::initialize(Operation *top) {}

void DeadCodeAnalysis::initializeSymbolCallables(Operation *top) {}

/// Returns true if the operation is a returning terminator in region
/// control-flow or the terminator of a callable region.
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) {}

/// Get the constant values of the operands of an operation. If any of the
/// constant value lattices are uninitialized, return std::nullopt to indicate
/// the analysis should bail out.
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) {}