aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/DependenceGraph.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-28 06:12:46 +0000
committerChris Lattner <sabre@nondot.org>2005-01-28 06:12:46 +0000
commit9cb992ab72671b1c793dfa3d9d57b7ae913008bb (patch)
tree3bd118b77ff207eea7443ac83706bbde63d9be6c /lib/Analysis/DataStructure/DependenceGraph.cpp
parentd19d89a04ca746056e8258543ba580cbde3f31be (diff)
Remove this code as it is currently completely broken and unmaintained.
If needed, this can be resurrected from CVS. Note that several of the interfaces (e.g. the IPModRef ones) are supersumed by generic AliasAnalysis interfaces that have been written since this code was developed (and they are not DSA specific). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19864 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/DependenceGraph.cpp')
-rw-r--r--lib/Analysis/DataStructure/DependenceGraph.cpp87
1 files changed, 0 insertions, 87 deletions
diff --git a/lib/Analysis/DataStructure/DependenceGraph.cpp b/lib/Analysis/DataStructure/DependenceGraph.cpp
deleted file mode 100644
index de3f45a447..0000000000
--- a/lib/Analysis/DataStructure/DependenceGraph.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//===- DependenceGraph.cpp - Dependence graph for a function ----*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements an explicit representation for the dependence graph
-// of a function, with one node per instruction and one edge per dependence.
-// Dependences include both data and control dependences.
-//
-// Each dep. graph node (class DepGraphNode) keeps lists of incoming and
-// outgoing dependence edges.
-//
-// Each dep. graph edge (class Dependence) keeps a pointer to one end-point
-// of the dependence. This saves space and is important because dep. graphs
-// can grow quickly. It works just fine because the standard idiom is to
-// start with a known node and enumerate the dependences to or from that node.
-//===----------------------------------------------------------------------===//
-
-
-#include "DependenceGraph.h"
-#include "llvm/Function.h"
-
-namespace llvm {
-
-//----------------------------------------------------------------------------
-// class Dependence:
-//
-// A representation of a simple (non-loop-related) dependence
-//----------------------------------------------------------------------------
-
-void Dependence::print(std::ostream &O) const
-{
- assert(depType != NoDependence && "This dependence should never be created!");
- switch (depType) {
- case TrueDependence: O << "TRUE dependence"; break;
- case AntiDependence: O << "ANTI dependence"; break;
- case OutputDependence: O << "OUTPUT dependence"; break;
- case ControlDependence: O << "CONTROL dependence"; break;
- default: assert(0 && "Invalid dependence type"); break;
- }
-}
-
-
-//----------------------------------------------------------------------------
-// class DepGraphNode
-//----------------------------------------------------------------------------
-
-void DepGraphNode::print(std::ostream &O) const
-{
- const_iterator DI = outDepBegin(), DE = outDepEnd();
-
- O << "\nDeps. from instr:" << getInstr();
-
- for ( ; DI != DE; ++DI)
- {
- O << "\t";
- DI->print(O);
- O << " to instruction:";
- O << DI->getSink()->getInstr();
- }
-}
-
-//----------------------------------------------------------------------------
-// class DependenceGraph
-//----------------------------------------------------------------------------
-
-DependenceGraph::~DependenceGraph()
-{
- // Free all DepGraphNode objects created for this graph
- for (map_iterator I = depNodeMap.begin(), E = depNodeMap.end(); I != E; ++I)
- delete I->second;
-}
-
-void DependenceGraph::print(const Function& func, std::ostream &O) const
-{
- O << "DEPENDENCE GRAPH FOR FUNCTION " << func.getName() << ":\n";
- for (Function::const_iterator BB=func.begin(), FE=func.end(); BB != FE; ++BB)
- for (BasicBlock::const_iterator II=BB->begin(), IE=BB->end(); II !=IE; ++II)
- if (const DepGraphNode* dgNode = this->getNode(*II))
- dgNode->print(O);
-}
-
-} // End llvm namespace