diff options
author | Bill Wendling <isanbard@gmail.com> | 2006-12-07 01:30:32 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2006-12-07 01:30:32 +0000 |
commit | e81561909d128c6e2d8033cb5465a49b2596b26a (patch) | |
tree | 6f2845604d482bc86d8d12aae500292c561d8cd7 /lib/Analysis/DataStructure | |
parent | 85c671b90870705ba7e10baf99aa306c843f1325 (diff) |
Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure')
-rw-r--r-- | lib/Analysis/DataStructure/BottomUpClosure.cpp | 24 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/CallTargets.cpp | 14 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 3 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/DataStructureStats.cpp | 12 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/EquivClassGraphs.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/GraphChecker.cpp | 32 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/Local.cpp | 4 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/Printer.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/Steensgaard.cpp | 2 |
9 files changed, 47 insertions, 48 deletions
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp index f5ca5fd6f5..e8592b13b6 100644 --- a/lib/Analysis/DataStructure/BottomUpClosure.cpp +++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp @@ -501,7 +501,7 @@ DSGraph &BUDataStructures::CreateGraphForExternalFunction(const Function &Fn) { DSG->getNodeForValue(F->arg_begin()).mergeWith(N); } else { - llvm_cerr << "Unrecognized external function: " << F->getName() << "\n"; + cerr << "Unrecognized external function: " << F->getName() << "\n"; abort(); } @@ -588,21 +588,21 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) { ++NumBUInlines; } else { if (!Printed) - llvm_cerr << "In Fns: " << Graph.getFunctionNames() << "\n"; - llvm_cerr << " calls " << CalledFuncs.size() - << " fns from site: " << CS.getCallSite().getInstruction() - << " " << *CS.getCallSite().getInstruction(); - llvm_cerr << " Fns ="; + cerr << "In Fns: " << Graph.getFunctionNames() << "\n"; + cerr << " calls " << CalledFuncs.size() + << " fns from site: " << CS.getCallSite().getInstruction() + << " " << *CS.getCallSite().getInstruction(); + cerr << " Fns ="; unsigned NumPrinted = 0; for (std::vector<Function*>::iterator I = CalledFuncs.begin(), E = CalledFuncs.end(); I != E; ++I) { - if (NumPrinted++ < 8) llvm_cerr << " " << (*I)->getName(); + if (NumPrinted++ < 8) cerr << " " << (*I)->getName(); // Add the call edges to the call graph. ActualCallees.insert(std::make_pair(TheCall, *I)); } - llvm_cerr << "\n"; + cerr << "\n"; // See if we already computed a graph for this set of callees. std::sort(CalledFuncs.begin(), CalledFuncs.end()); @@ -645,7 +645,7 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) { // Clean up the final graph! GI->removeDeadNodes(DSGraph::KeepUnreachableGlobals); } else { - llvm_cerr << "***\n*** RECYCLED GRAPH ***\n***\n"; + cerr << "***\n*** RECYCLED GRAPH ***\n***\n"; } GI = IndCallGraph.first; @@ -685,7 +685,7 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) { E = MainSM.global_end(); I != E; ++I) RC.getClonedNH(MainSM[*I]); - //Graph.writeGraphToFile(llvm_cerr, "bu_" + F.getName()); + //Graph.writeGraphToFile(cerr, "bu_" + F.getName()); } static const Function *getFnForValue(const Value *V) { @@ -746,8 +746,8 @@ void BUDataStructures::copyValue(Value *From, Value *To) { return; } - llvm_cerr << *From; - llvm_cerr << *To; + cerr << *From; + cerr << *To; assert(0 && "Do not know how to copy this yet!"); abort(); } diff --git a/lib/Analysis/DataStructure/CallTargets.cpp b/lib/Analysis/DataStructure/CallTargets.cpp index 5ed4457418..bae866fd34 100644 --- a/lib/Analysis/DataStructure/CallTargets.cpp +++ b/lib/Analysis/DataStructure/CallTargets.cpp @@ -17,15 +17,15 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Analysis/DataStructure/CallTargets.h" #include "llvm/Module.h" #include "llvm/Instructions.h" #include "llvm/Analysis/DataStructure/DataStructure.h" #include "llvm/Analysis/DataStructure/DSGraph.h" -#include "llvm/Analysis/DataStructure/CallTargets.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/Streams.h" -#include <ostream> #include "llvm/Constants.h" +#include <ostream> using namespace llvm; namespace { @@ -58,11 +58,11 @@ void CallTargetFinder::findIndTargets(Module &M) } if (N->isComplete() && !IndMap[cs].size()) { ++CompleteEmpty; - llvm_cerr << "Call site empty: '" - << cs.getInstruction()->getName() - << "' In '" - << cs.getInstruction()->getParent()->getParent()->getName() - << "'\n"; + cerr << "Call site empty: '" + << cs.getInstruction()->getName() + << "' In '" + << cs.getInstruction()->getParent()->getParent()->getName() + << "'\n"; } } else { ++DirCall; diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 80237c4f0b..c81fd6ad34 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -25,7 +25,6 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SCCIterator.h" #include "llvm/ADT/Statistic.h" -#include "llvm/Support/Streams.h" #include "llvm/Support/Timer.h" #include <iostream> #include <algorithm> @@ -1263,7 +1262,7 @@ DSGraph::~DSGraph() { } // dump - Allow inspection of graph in a debugger. -void DSGraph::dump() const { print(llvm_cerr); } +void DSGraph::dump() const { print(cerr); } /// remapLinks - Change all of the Links in the current node according to the diff --git a/lib/Analysis/DataStructure/DataStructureStats.cpp b/lib/Analysis/DataStructure/DataStructureStats.cpp index f7fbe3b33c..1357a334eb 100644 --- a/lib/Analysis/DataStructure/DataStructureStats.cpp +++ b/lib/Analysis/DataStructure/DataStructureStats.cpp @@ -92,18 +92,18 @@ void DSGraphStats::countCallees(const Function& F) { totalNumCallees += Callees.size(); ++numIndirectCalls; } else - llvm_cerr << "WARNING: No callee in Function '" << F.getName() - << "' at call: \n" - << *I->getCallSite().getInstruction(); + cerr << "WARNING: No callee in Function '" << F.getName() + << "' at call: \n" + << *I->getCallSite().getInstruction(); } TotalNumCallees += totalNumCallees; NumIndirectCalls += numIndirectCalls; if (numIndirectCalls) - llvm_cout << " In function " << F.getName() << ": " - << (totalNumCallees / (double) numIndirectCalls) - << " average callees per indirect call\n"; + cout << " In function " << F.getName() << ": " + << (totalNumCallees / (double) numIndirectCalls) + << " average callees per indirect call\n"; } DSNode *DSGraphStats::getNodeForValue(Value *V) { diff --git a/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/lib/Analysis/DataStructure/EquivClassGraphs.cpp index 49c93ffc4f..2813b943ad 100644 --- a/lib/Analysis/DataStructure/EquivClassGraphs.cpp +++ b/lib/Analysis/DataStructure/EquivClassGraphs.cpp @@ -90,7 +90,7 @@ bool EquivClassGraphs::runOnModule(Module &M) { if (MainFunc && !MainFunc->isExternal()) { processSCC(getOrCreateGraph(*MainFunc), Stack, NextID, ValMap); } else { - llvm_cerr << "Fold Graphs: No 'main' function found!\n"; + cerr << "Fold Graphs: No 'main' function found!\n"; } for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) diff --git a/lib/Analysis/DataStructure/GraphChecker.cpp b/lib/Analysis/DataStructure/GraphChecker.cpp index cef3efed8f..8e4d3fce87 100644 --- a/lib/Analysis/DataStructure/GraphChecker.cpp +++ b/lib/Analysis/DataStructure/GraphChecker.cpp @@ -84,8 +84,8 @@ FunctionPass *llvm::createDataStructureGraphCheckerPass() { DSGC::DSGC() { if (!AbortIfAnyCollapsed && AbortIfCollapsed.empty() && CheckFlags.empty() && AbortIfMerged.empty()) { - llvm_cerr << "The -datastructure-gc is useless if you don't specify any" - " -dsgc-* options. See the -help-hidden output for a list.\n"; + cerr << "The -datastructure-gc is useless if you don't specify any" + << " -dsgc-* options. See the -help-hidden output for a list.\n"; abort(); } } @@ -123,8 +123,8 @@ void DSGC::verify(const DSGraph &G) { for (DSGraph::node_const_iterator I = G.node_begin(), E = G.node_end(); I != E; ++I) if (I->isNodeCompletelyFolded()) { - llvm_cerr << "Node is collapsed: "; - I->print(llvm_cerr, &G); + cerr << "Node is collapsed: "; + I->print(cerr, &G); abort(); } } @@ -142,8 +142,8 @@ void DSGC::verify(const DSGraph &G) { E = CheckFlags.end(); I != E; ++I) { std::string::size_type ColonPos = I->rfind(':'); if (ColonPos == std::string::npos) { - llvm_cerr << "Error: '" << *I - << "' is an invalid value for the --dsgc-check-flags option!\n"; + cerr << "Error: '" << *I + << "' is an invalid value for the --dsgc-check-flags option!\n"; abort(); } @@ -158,7 +158,7 @@ void DSGC::verify(const DSGraph &G) { case 'M': Flags |= DSNode::Modified; break; case 'R': Flags |= DSNode::Read; break; case 'A': Flags |= DSNode::Array; break; - default: llvm_cerr << "Invalid DSNode flag!\n"; abort(); + default: cerr << "Invalid DSNode flag!\n"; abort(); } CheckFlagsM[std::string(I->begin(), I->begin()+ColonPos)] = Flags; } @@ -176,25 +176,25 @@ void DSGC::verify(const DSGraph &G) { // Verify it is not collapsed if it is not supposed to be... if (N->isNodeCompletelyFolded() && AbortIfCollapsedS.count(Name)) { - llvm_cerr << "Node for value '%" << Name << "' is collapsed: "; - N->print(llvm_cerr, &G); + cerr << "Node for value '%" << Name << "' is collapsed: "; + N->print(cerr, &G); abort(); } if (CheckFlagsM.count(Name) && CheckFlagsM[Name] != N->getNodeFlags()) { - llvm_cerr << "Node flags are not as expected for node: " << Name - << " (" << CheckFlagsM[Name] << ":" <<N->getNodeFlags() - << ")\n"; - N->print(llvm_cerr, &G); + cerr << "Node flags are not as expected for node: " << Name + << " (" << CheckFlagsM[Name] << ":" <<N->getNodeFlags() + << ")\n"; + N->print(cerr, &G); abort(); } // Verify that it is not merged if it is not supposed to be... if (AbortIfMergedS.count(Name)) { if (AbortIfMergedNodes.count(N)) { - llvm_cerr << "Nodes for values '%" << Name << "' and '%" - << AbortIfMergedNodes[N] << "' is merged: "; - N->print(llvm_cerr, &G); + cerr << "Nodes for values '%" << Name << "' and '%" + << AbortIfMergedNodes[N] << "' is merged: "; + N->print(cerr, &G); abort(); } AbortIfMergedNodes[N] = Name; diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 436218be9e..66ca33d876 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -434,7 +434,7 @@ void GraphBuilder::visitGetElementPtrInst(User &GEP) { // Variable index into a node. We must merge all of the elements of the // sequential type here. if (isa<PointerType>(STy)) - llvm_cerr << "Pointer indexing not handled yet!\n"; + cerr << "Pointer indexing not handled yet!\n"; else { const ArrayType *ATy = cast<ArrayType>(STy); unsigned ElSize = TD.getTypeSize(CurTy); @@ -1061,7 +1061,7 @@ void GraphBuilder::visitCallSite(CallSite CS) { if (DisableDirectCallOpt || !isa<Function>(Callee)) { CalleeNode = getValueDest(*Callee).getNode(); if (CalleeNode == 0) { - llvm_cerr << "WARNING: Program is calling through a null pointer?\n"<< *I; + cerr << "WARNING: Program is calling through a null pointer?\n"<< *I; return; // Calling a null pointer? } } diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index 2e86bda548..21d75c08bc 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/lib/Analysis/DataStructure/Printer.cpp @@ -37,7 +37,7 @@ namespace { Statistic NumFoldedNodes ("dsa", "Number of folded nodes (in final graph)"); } -void DSNode::dump() const { print(llvm_cerr, 0); } +void DSNode::dump() const { print(cerr, 0); } static std::string getCaption(const DSNode *N, const DSGraph *G) { std::stringstream OS; diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp index 292dfffa0d..5ff3c3f852 100644 --- a/lib/Analysis/DataStructure/Steensgaard.cpp +++ b/lib/Analysis/DataStructure/Steensgaard.cpp @@ -53,7 +53,7 @@ namespace { } // print - Implement the Pass::print method... - void print(llvm_ostream O, const Module *M) const { + void print(OStream O, const Module *M) const { if (O.stream()) print(*O.stream(), M); } void print(std::ostream &O, const Module *M) const { |