llvm/llvm/lib/Analysis/DDG.cpp

//===- DDG.cpp - Data Dependence Graph -------------------------------------==//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// The implementation for the data dependence graph.
//===----------------------------------------------------------------------===//
#include "llvm/Analysis/DDG.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopIterator.h"
#include "llvm/Support/CommandLine.h"

usingnamespacellvm;

static cl::opt<bool> SimplifyDDG(
    "ddg-simplify", cl::init(true), cl::Hidden,
    cl::desc(
        "Simplify DDG by merging nodes that have less interesting edges."));

static cl::opt<bool> CreatePiBlocks("ddg-pi-blocks", cl::init(true), cl::Hidden,
                                    cl::desc("Create pi-block nodes."));

#define DEBUG_TYPE

template class llvm::DGEdge<DDGNode, DDGEdge>;
template class llvm::DGNode<DDGNode, DDGEdge>;
template class llvm::DirectedGraph<DDGNode, DDGEdge>;

//===--------------------------------------------------------------------===//
// DDGNode implementation
//===--------------------------------------------------------------------===//
DDGNode::~DDGNode() = default;

bool DDGNode::collectInstructions(
    llvm::function_ref<bool(Instruction *)> const &Pred,
    InstructionListType &IList) const {}

raw_ostream &llvm::operator<<(raw_ostream &OS, const DDGNode::NodeKind K) {}

raw_ostream &llvm::operator<<(raw_ostream &OS, const DDGNode &N) {}

//===--------------------------------------------------------------------===//
// SimpleDDGNode implementation
//===--------------------------------------------------------------------===//

SimpleDDGNode::SimpleDDGNode(Instruction &I)
    :{}

SimpleDDGNode::SimpleDDGNode(const SimpleDDGNode &N)
    :{}

SimpleDDGNode::SimpleDDGNode(SimpleDDGNode &&N)
    :{}

SimpleDDGNode::~SimpleDDGNode() {}

//===--------------------------------------------------------------------===//
// PiBlockDDGNode implementation
//===--------------------------------------------------------------------===//

PiBlockDDGNode::PiBlockDDGNode(const PiNodeList &List)
    :{}

PiBlockDDGNode::PiBlockDDGNode(const PiBlockDDGNode &N)
    :{}

PiBlockDDGNode::PiBlockDDGNode(PiBlockDDGNode &&N)
    :{}

PiBlockDDGNode::~PiBlockDDGNode() {}

//===--------------------------------------------------------------------===//
// DDGEdge implementation
//===--------------------------------------------------------------------===//

raw_ostream &llvm::operator<<(raw_ostream &OS, const DDGEdge::EdgeKind K) {}

raw_ostream &llvm::operator<<(raw_ostream &OS, const DDGEdge &E) {}

//===--------------------------------------------------------------------===//
// DataDependenceGraph implementation
//===--------------------------------------------------------------------===//
BasicBlockListType;

DataDependenceGraph::DataDependenceGraph(Function &F, DependenceInfo &D)
    :{}

DataDependenceGraph::DataDependenceGraph(Loop &L, LoopInfo &LI,
                                         DependenceInfo &D)
    :{}

DataDependenceGraph::~DataDependenceGraph() {}

bool DataDependenceGraph::addNode(DDGNode &N) {}

const PiBlockDDGNode *DataDependenceGraph::getPiBlock(const NodeType &N) const {}

raw_ostream &llvm::operator<<(raw_ostream &OS, const DataDependenceGraph &G) {}

//===--------------------------------------------------------------------===//
// DDGBuilder implementation
//===--------------------------------------------------------------------===//

bool DDGBuilder::areNodesMergeable(const DDGNode &Src,
                                   const DDGNode &Tgt) const {}

void DDGBuilder::mergeNodes(DDGNode &A, DDGNode &B) {}

bool DDGBuilder::shouldSimplify() const {}

bool DDGBuilder::shouldCreatePiBlocks() const {}

//===--------------------------------------------------------------------===//
// DDG Analysis Passes
//===--------------------------------------------------------------------===//

/// DDG as a loop pass.
DDGAnalysis::Result DDGAnalysis::run(Loop &L, LoopAnalysisManager &AM,
                                     LoopStandardAnalysisResults &AR) {}
AnalysisKey DDGAnalysis::Key;

PreservedAnalyses DDGAnalysisPrinterPass::run(Loop &L, LoopAnalysisManager &AM,
                                              LoopStandardAnalysisResults &AR,
                                              LPMUpdater &U) {}