Reimplement/port the Bottom Up Closure pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4031 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-10-03 20:38:41 +00:00
parent 24b7799a10
commit 55c1058135
2 changed files with 61 additions and 38 deletions

View File

@@ -13,6 +13,12 @@
#include <sstream>
using std::string;
// OnlyPrintMain - The DataStructure printer exposes this option to allow
// printing of only the graph for "main".
//
static cl::opt<bool> OnlyPrintMain("only-print-main-ds", cl::ReallyHidden);
void DSNode::dump() const { print(std::cerr, 0); }
static string getCaption(const DSNode *N, const DSGraph *G) {
@@ -168,8 +174,6 @@ void DSGraph::writeGraphToFile(std::ostream &O, const string &GraphName) {
}
}
static cl::opt<bool> OnlyPrintMain("only-print-main-ds", cl::ReallyHidden);
template <typename Collection>
static void printCollection(const Collection &C, std::ostream &O,
const Module *M, const string &Prefix) {
@@ -189,17 +193,18 @@ void LocalDataStructures::print(std::ostream &O, const Module *M) const {
printCollection(*this, O, M, "ds.");
}
#if 0
void BUDataStructures::print(std::ostream &O, const Module *M) const {
printCollection(*this, O, M, "bu.");
#if 0
for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I)
if (!I->isExternal()) {
(*getDSGraph(*I).GlobalsGraph)->writeGraphToFile(O, "gg.program");
break;
}
#endif
}
#if 0
void TDDataStructures::print(std::ostream &O, const Module *M) const {
printCollection(*this, O, M, "td.");