[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp CallTargets.cpp DataStructure.cpp DataStructureStats.cpp EquivClassGraphs.cpp GraphChecker.cpp Local.cpp Printer.cpp Steensgaard.cpp
Bill Wendling
isanbard at gmail.com
Wed Dec 6 17:32:03 PST 2006
Changes in directory llvm/lib/Analysis/DataStructure:
BottomUpClosure.cpp updated: 1.126 -> 1.127
CallTargets.cpp updated: 1.6 -> 1.7
DataStructure.cpp updated: 1.253 -> 1.254
DataStructureStats.cpp updated: 1.23 -> 1.24
EquivClassGraphs.cpp updated: 1.52 -> 1.53
GraphChecker.cpp updated: 1.22 -> 1.23
Local.cpp updated: 1.162 -> 1.163
Printer.cpp updated: 1.90 -> 1.91
Steensgaard.cpp updated: 1.66 -> 1.67
---
Log message:
Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.
---
Diffs of the changes: (+47 -48)
BottomUpClosure.cpp | 24 ++++++++++++------------
CallTargets.cpp | 14 +++++++-------
DataStructure.cpp | 3 +--
DataStructureStats.cpp | 12 ++++++------
EquivClassGraphs.cpp | 2 +-
GraphChecker.cpp | 32 ++++++++++++++++----------------
Local.cpp | 4 ++--
Printer.cpp | 2 +-
Steensgaard.cpp | 2 +-
9 files changed, 47 insertions(+), 48 deletions(-)
Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.126 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.127
--- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.126 Wed Dec 6 11:46:31 2006
+++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Wed Dec 6 19:30:31 2006
@@ -501,7 +501,7 @@
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 @@
++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 @@
// 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 @@
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 @@
return;
}
- llvm_cerr << *From;
- llvm_cerr << *To;
+ cerr << *From;
+ cerr << *To;
assert(0 && "Do not know how to copy this yet!");
abort();
}
Index: llvm/lib/Analysis/DataStructure/CallTargets.cpp
diff -u llvm/lib/Analysis/DataStructure/CallTargets.cpp:1.6 llvm/lib/Analysis/DataStructure/CallTargets.cpp:1.7
--- llvm/lib/Analysis/DataStructure/CallTargets.cpp:1.6 Wed Dec 6 11:46:31 2006
+++ llvm/lib/Analysis/DataStructure/CallTargets.cpp Wed Dec 6 19:30:31 2006
@@ -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 @@
}
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;
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.253 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.254
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.253 Wed Dec 6 11:46:31 2006
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Wed Dec 6 19:30:31 2006
@@ -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 @@
}
// 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
Index: llvm/lib/Analysis/DataStructure/DataStructureStats.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.23 llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.24
--- llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.23 Wed Dec 6 11:46:31 2006
+++ llvm/lib/Analysis/DataStructure/DataStructureStats.cpp Wed Dec 6 19:30:31 2006
@@ -92,18 +92,18 @@
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) {
Index: llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp
diff -u llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.52 llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.53
--- llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp:1.52 Wed Dec 6 11:46:31 2006
+++ llvm/lib/Analysis/DataStructure/EquivClassGraphs.cpp Wed Dec 6 19:30:31 2006
@@ -90,7 +90,7 @@
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)
Index: llvm/lib/Analysis/DataStructure/GraphChecker.cpp
diff -u llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.22 llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.23
--- llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.22 Tue Nov 28 17:33:06 2006
+++ llvm/lib/Analysis/DataStructure/GraphChecker.cpp Wed Dec 6 19:30:31 2006
@@ -84,8 +84,8 @@
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 @@
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 @@
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 @@
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 @@
// 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;
Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.162 llvm/lib/Analysis/DataStructure/Local.cpp:1.163
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.162 Tue Nov 28 18:19:40 2006
+++ llvm/lib/Analysis/DataStructure/Local.cpp Wed Dec 6 19:30:31 2006
@@ -434,7 +434,7 @@
// 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 @@
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?
}
}
Index: llvm/lib/Analysis/DataStructure/Printer.cpp
diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.90 llvm/lib/Analysis/DataStructure/Printer.cpp:1.91
--- llvm/lib/Analysis/DataStructure/Printer.cpp:1.90 Wed Dec 6 11:46:31 2006
+++ llvm/lib/Analysis/DataStructure/Printer.cpp Wed Dec 6 19:30:31 2006
@@ -37,7 +37,7 @@
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;
Index: llvm/lib/Analysis/DataStructure/Steensgaard.cpp
diff -u llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.66 llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.67
--- llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.66 Tue Nov 28 18:19:40 2006
+++ llvm/lib/Analysis/DataStructure/Steensgaard.cpp Wed Dec 6 19:30:31 2006
@@ -53,7 +53,7 @@
}
// 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 {
More information about the llvm-commits
mailing list