llvm/llvm/lib/Analysis/DependenceGraphBuilder.cpp

//===- DependenceGraphBuilder.cpp ------------------------------------------==//
//
// 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
//
//===----------------------------------------------------------------------===//
// This file implements common steps of the build algorithm for construction
// of dependence graphs such as DDG and PDG.
//===----------------------------------------------------------------------===//

#include "llvm/Analysis/DependenceGraphBuilder.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/EnumeratedArray.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/DDG.h"

usingnamespacellvm;

#define DEBUG_TYPE

STATISTIC(TotalGraphs, "Number of dependence graphs created.");
STATISTIC(TotalDefUseEdges, "Number of def-use edges created.");
STATISTIC(TotalMemoryEdges, "Number of memory dependence edges created.");
STATISTIC(TotalFineGrainedNodes, "Number of fine-grained nodes created.");
STATISTIC(TotalPiBlockNodes, "Number of pi-block nodes created.");
STATISTIC(TotalConfusedEdges,
          "Number of confused memory dependencies between two nodes.");
STATISTIC(TotalEdgeReversals,
          "Number of times the source and sink of dependence was reversed to "
          "expose cycles in the graph.");

InstructionListType;

//===--------------------------------------------------------------------===//
// AbstractDependenceGraphBuilder implementation
//===--------------------------------------------------------------------===//

template <class G>
void AbstractDependenceGraphBuilder<G>::computeInstructionOrdinals() {}

template <class G>
void AbstractDependenceGraphBuilder<G>::createFineGrainedNodes() {}

template <class G>
void AbstractDependenceGraphBuilder<G>::createAndConnectRootNode() {}

template <class G> void AbstractDependenceGraphBuilder<G>::createPiBlocks() {}

template <class G> void AbstractDependenceGraphBuilder<G>::createDefUseEdges() {}

template <class G>
void AbstractDependenceGraphBuilder<G>::createMemoryDependencyEdges() {}

template <class G> void AbstractDependenceGraphBuilder<G>::simplify() {}

template <class G>
void AbstractDependenceGraphBuilder<G>::sortNodesTopologically() {}

template class llvm::AbstractDependenceGraphBuilder<DataDependenceGraph>;
template class llvm::DependenceGraphInfo<DDGNode>;