aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/CommandLine.html2
-rw-r--r--docs/ProgrammersManual.html26
-rw-r--r--docs/WritingAnLLVMPass.html8
-rw-r--r--lib/CodeGen/MachineDebugInfo.cpp196
-rw-r--r--lib/CodeGen/RegAllocLocal.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp32
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp9
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAG.cpp48
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp17
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp31
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp30
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp86
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp25
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp21
-rw-r--r--lib/ExecutionEngine/Interpreter/Interpreter.h3
-rw-r--r--lib/ExecutionEngine/JIT/Intercept.cpp5
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp11
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp55
-rw-r--r--lib/ExecutionEngine/JIT/TargetSelect.cpp7
-rw-r--r--lib/Transforms/IPO/FunctionResolution.cpp38
-rw-r--r--lib/Transforms/Scalar/CorrelatedExprs.cpp35
-rw-r--r--lib/Transforms/Scalar/PredicateSimplifier.cpp62
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp34
-rw-r--r--lib/VMCore/AsmWriter.cpp5
-rw-r--r--lib/VMCore/Module.cpp3
-rw-r--r--lib/VMCore/Pass.cpp43
-rw-r--r--lib/VMCore/PassManagerT.h27
27 files changed, 414 insertions, 447 deletions
diff --git a/docs/CommandLine.html b/docs/CommandLine.html
index b04820e88a..8358d8756e 100644
--- a/docs/CommandLine.html
+++ b/docs/CommandLine.html
@@ -1042,7 +1042,7 @@ extern bool DebugFlag;
// debug build, then the code specified as the option to the macro will be
// executed. Otherwise it will not be. Example:
//
-// DEBUG(std::cerr << "Bitset contains: " << Bitset << "\n");
+// DOUT << "Bitset contains: " << Bitset << "\n";
//</i>
<span class="doc_hilite">#ifdef NDEBUG
#define DEBUG(X)
diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html
index 950c937824..4fd3a4a5e5 100644
--- a/docs/ProgrammersManual.html
+++ b/docs/ProgrammersManual.html
@@ -395,7 +395,7 @@ tool) is run with the '<tt>-debug</tt>' command line argument:</p>
<div class="doc_code">
<pre>
-DEBUG(std::cerr &lt;&lt; "I am here!\n");
+DOUT &lt;&lt; "I am here!\n";
</pre>
</div>
@@ -440,16 +440,16 @@ option as follows:</p>
<div class="doc_code">
<pre>
-DEBUG(std::cerr &lt;&lt; "No debug type\n");
+DOUT &lt;&lt; "No debug type\n";
#undef DEBUG_TYPE
#define DEBUG_TYPE "foo"
-DEBUG(std::cerr &lt;&lt; "'foo' debug type\n");
+DOUT &lt;&lt; "'foo' debug type\n";
#undef DEBUG_TYPE
#define DEBUG_TYPE "bar"
-DEBUG(std::cerr &lt;&lt; "'bar' debug type\n");
+DOUT &lt;&lt; "'bar' debug type\n";
#undef DEBUG_TYPE
#define DEBUG_TYPE ""
-DEBUG(std::cerr &lt;&lt; "No debug type (2)\n");
+DOUT &lt;&lt; "No debug type (2)\n";
</pre>
</div>
@@ -695,8 +695,8 @@ an example that prints the name of a <tt>BasicBlock</tt> and the number of
for (Function::iterator i = func-&gt;begin(), e = func-&gt;end(); i != e; ++i)
// <i>Print out the name of the basic block if it has one, and then the</i>
// <i>number of instructions that it contains</i>
- std::cerr &lt;&lt; "Basic block (name=" &lt;&lt; i-&gt;getName() &lt;&lt; ") has "
- &lt;&lt; i-&gt;size() &lt;&lt; " instructions.\n";
+ llvm::cerr &lt;&lt; "Basic block (name=" &lt;&lt; i-&gt;getName() &lt;&lt; ") has "
+ &lt;&lt; i-&gt;size() &lt;&lt; " instructions.\n";
</pre>
</div>
@@ -728,14 +728,14 @@ a <tt>BasicBlock</tt>:</p>
for (BasicBlock::iterator i = blk-&gt;begin(), e = blk-&gt;end(); i != e; ++i)
// <i>The next statement works since operator&lt;&lt;(ostream&amp;,...)</i>
// <i>is overloaded for Instruction&amp;</i>
- std::cerr &lt;&lt; *i &lt;&lt; "\n";
+ llvm::cerr &lt;&lt; *i &lt;&lt; "\n";
</pre>
</div>
<p>However, this isn't really the best way to print out the contents of a
<tt>BasicBlock</tt>! Since the ostream operators are overloaded for virtually
anything you'll care about, you could have just invoked the print routine on the
-basic block itself: <tt>std::cerr &lt;&lt; *blk &lt;&lt; "\n";</tt>.</p>
+basic block itself: <tt>llvm::cerr &lt;&lt; *blk &lt;&lt; "\n";</tt>.</p>
</div>
@@ -761,7 +761,7 @@ small example that shows how to dump all instructions in a function to the stand
// <i>F is a ptr to a Function instance</i>
for (inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i)
- std::cerr &lt;&lt; *i &lt;&lt; "\n";
+ llvm::cerr &lt;&lt; *i &lt;&lt; "\n";
</pre>
</div>
@@ -837,7 +837,7 @@ without actually obtaining it via iteration over some structure:</p>
void printNextInstruction(Instruction* inst) {
BasicBlock::iterator it(inst);
++it; // <i>After this line, it refers to the instruction after *inst</i>
- if (it != inst-&gt;getParent()-&gt;end()) std::cerr &lt;&lt; *it &lt;&lt; "\n";
+ if (it != inst-&gt;getParent()-&gt;end()) llvm::cerr &lt;&lt; *it &lt;&lt; "\n";
}
</pre>
</div>
@@ -956,8 +956,8 @@ Function* F = ...;
for (Value::use_iterator i = F-&gt;use_begin(), e = F-&gt;use_end(); i != e; ++i)
if (Instruction *Inst = dyn_cast&lt;Instruction&gt;(*i)) {
- std::cerr &lt;&lt; "F is used in instruction:\n";
- std::cerr &lt;&lt; *Inst &lt;&lt; "\n";
+ llvm::cerr &lt;&lt; "F is used in instruction:\n";
+ llvm::cerr &lt;&lt; *Inst &lt;&lt; "\n";
}
</pre>
</div>
diff --git a/docs/WritingAnLLVMPass.html b/docs/WritingAnLLVMPass.html
index b33edb0eb6..0c362d0e7c 100644
--- a/docs/WritingAnLLVMPass.html
+++ b/docs/WritingAnLLVMPass.html
@@ -257,7 +257,7 @@ time.</p>
<div class="doc_code"><pre>
<b>virtual bool</b> <a href="#runOnFunction">runOnFunction</a>(Function &amp;F) {
- std::cerr &lt;&lt; "<i>Hello: </i>" &lt;&lt; F.getName() &lt;&lt; "\n";
+ llvm::cerr &lt;&lt; "<i>Hello: </i>" &lt;&lt; F.getName() &lt;&lt; "\n";
<b>return false</b>;
}
}; <i>// end of struct Hello</i>
@@ -289,7 +289,7 @@ argument "<tt>hello</tt>", and a name "<tt>Hello World Pass</tt>".</p>
<b>namespace</b> {
<b>struct Hello</b> : <b>public</b> <a href="#FunctionPass">FunctionPass</a> {
<b>virtual bool</b> <a href="#runOnFunction">runOnFunction</a>(Function &amp;F) {
- std::cerr &lt;&lt; "<i>Hello: </i>" &lt;&lt; F.getName() &lt;&lt; "\n";
+ llvm::cerr &lt;&lt; "<i>Hello: </i>" &lt;&lt; F.getName() &lt;&lt; "\n";
<b>return false</b>;
}
};
@@ -863,7 +863,7 @@ implement the virtual <tt>print</tt> method:</p>
<div class="doc_text">
<div class="doc_code"><pre>
- <b>virtual void</b> print(std::ostream &amp;O, <b>const</b> Module *M) <b>const</b>;
+ <b>virtual void</b> print(llvm::OStream &amp;O, <b>const</b> Module *M) <b>const</b>;
</pre></div>
<p>The <tt>print</tt> method must be implemented by "analyses" in order to print
@@ -871,7 +871,7 @@ a human readable version of the analysis results. This is useful for debugging
an analysis itself, as well as for other people to figure out how an analysis
works. Use the <tt>opt -analyze</tt> argument to invoke this method.</p>
-<p>The <tt>ostream</tt> parameter specifies the stream to write the results on,
+<p>The <tt>llvm::OStream</tt> parameter specifies the stream to write the results on,
and the <tt>Module</tt> parameter gives a pointer to the top level module of the
program that has been analyzed. Note however that this pointer may be null in
certain circumstances (such as calling the <tt>Pass::dump()</tt> from a
diff --git a/lib/CodeGen/MachineDebugInfo.cpp b/lib/CodeGen/MachineDebugInfo.cpp
index 48db413d53..bc75ccb7a6 100644
--- a/lib/CodeGen/MachineDebugInfo.cpp
+++ b/lib/CodeGen/MachineDebugInfo.cpp
@@ -21,9 +21,7 @@
#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/Support/Dwarf.h"
-
-#include <iostream>
-
+#include "llvm/Support/Streams.h"
using namespace llvm;
using namespace llvm::dwarf;
@@ -589,10 +587,10 @@ const char *AnchorDesc::getTypeString() const {
#ifndef NDEBUG
void AnchorDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "), "
- << "AnchorTag(" << AnchorTag << ")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "), "
+ << "AnchorTag(" << AnchorTag << ")\n";
}
#endif
@@ -664,14 +662,14 @@ const char *CompileUnitDesc::getAnchorString() const {
#ifndef NDEBUG
void CompileUnitDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "), "
- << "Anchor(" << getAnchor() << "), "
- << "Language(" << Language << "), "
- << "FileName(\"" << FileName << "\"), "
- << "Directory(\"" << Directory << "\"), "
- << "Producer(\"" << Producer << "\")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "), "
+ << "Anchor(" << getAnchor() << "), "
+ << "Language(" << Language << "), "
+ << "FileName(\"" << FileName << "\"), "
+ << "Directory(\"" << Directory << "\"), "
+ << "Producer(\"" << Producer << "\")\n";
}
#endif
@@ -718,17 +716,17 @@ const char *TypeDesc::getTypeString() const {
#ifndef NDEBUG
void TypeDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "), "
- << "Context(" << Context << "), "
- << "Name(\"" << Name << "\"), "
- << "File(" << File << "), "
- << "Line(" << Line << "), "
- << "Size(" << Size << "), "
- << "Align(" << Align << "), "
- << "Offset(" << Offset << "), "
- << "Flags(" << Flags << ")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "), "
+ << "Context(" << Context << "), "
+ << "Name(\"" << Name << "\"), "
+ << "File(" << File << "), "
+ << "Line(" << Line << "), "
+ << "Size(" << Size << "), "
+ << "Align(" << Align << "), "
+ << "Offset(" << Offset << "), "
+ << "Flags(" << Flags << ")\n";
}
#endif
@@ -766,13 +764,13 @@ const char *BasicTypeDesc::getTypeString() const {
#ifndef NDEBUG
void BasicTypeDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "), "
- << "Context(" << getContext() << "), "
- << "Name(\"" << getName() << "\"), "
- << "Size(" << getSize() << "), "
- << "Encoding(" << Encoding << ")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "), "
+ << "Context(" << getContext() << "), "
+ << "Name(\"" << getName() << "\"), "
+ << "Size(" << getSize() << "), "
+ << "Encoding(" << Encoding << ")\n";
}
#endif
@@ -823,15 +821,15 @@ const char *DerivedTypeDesc::getTypeString() const {
#ifndef NDEBUG
void DerivedTypeDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "), "
- << "Context(" << getContext() << "), "
- << "Name(\"" << getName() << "\"), "
- << "Size(" << getSize() << "), "
- << "File(" << getFile() << "), "
- << "Line(" << getLine() << "), "
- << "FromType(" << FromType << ")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "), "
+ << "Context(" << getContext() << "), "
+ << "Name(\"" << getName() << "\"), "
+ << "Size(" << getSize() << "), "
+ << "File(" << getFile() << "), "
+ << "Line(" << getLine() << "), "
+ << "FromType(" << FromType << ")\n";
}
#endif
@@ -880,16 +878,16 @@ const char *CompositeTypeDesc::getTypeString() const {
#ifndef NDEBUG
void CompositeTypeDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "), "
- << "Context(" << getContext() << "), "
- << "Name(\"" << getName() << "\"), "
- << "Size(" << getSize() << "), "
- << "File(" << getFile() << "), "
- << "Line(" << getLine() << "), "
- << "FromType(" << getFromType() << "), "
- << "Elements.size(" << Elements.size() << ")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "), "
+ << "Context(" << getContext() << "), "
+ << "Name(\"" << getName() << "\"), "
+ << "Size(" << getSize() << "), "
+ << "File(" << getFile() << "), "
+ << "Line(" << getLine() << "), "
+ << "FromType(" << getFromType() << "), "
+ << "Elements.size(" << Elements.size() << ")\n";
}
#endif
@@ -929,11 +927,11 @@ const char *SubrangeDesc::getTypeString() const {
#ifndef NDEBUG
void SubrangeDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "), "
- << "Lo(" << Lo << "), "
- << "Hi(" << Hi << ")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "), "
+ << "Lo(" << Lo << "), "
+ << "Hi(" << Hi << ")\n";
}
#endif
@@ -973,11 +971,11 @@ const char *EnumeratorDesc::getTypeString() const {
#ifndef NDEBUG
void EnumeratorDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "), "
- << "Name(" << Name << "), "
- << "Value(" << Value << ")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "), "
+ << "Name(" << Name << "), "
+ << "Value(" << Value << ")\n";
}
#endif
@@ -1031,14 +1029,14 @@ const char *VariableDesc::getTypeString() const {
#ifndef NDEBUG
void VariableDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "), "
- << "Context(" << Context << "), "
- << "Name(\"" << Name << "\"), "
- << "File(" << File << "), "
- << "Line(" << Line << "), "
- << "TyDesc(" << TyDesc << ")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "), "
+ << "Context(" << Context << "), "
+ << "Name(\"" << Name << "\"), "
+ << "File(" << File << "), "
+ << "Line(" << Line << "), "
+ << "TyDesc(" << TyDesc << ")\n";
}
#endif
@@ -1114,19 +1112,19 @@ const char *GlobalVariableDesc::getAnchorString() const {
#ifndef NDEBUG
void GlobalVariableDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "), "
- << "Anchor(" << getAnchor() << "), "
- << "Name(\"" << getName() << "\"), "
- << "FullName(\"" << getFullName() << "\"), "
- << "LinkageName(\"" << getLinkageName() << "\"), "
- << "File(" << getFile() << "),"
- << "Line(" << getLine() << "),"
- << "Type(" << getType() << "), "
- << "IsStatic(" << (isStatic() ? "true" : "false") << "), "
- << "IsDefinition(" << (isDefinition() ? "true" : "false") << "), "
- << "Global(" << Global << ")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "), "
+ << "Anchor(" << getAnchor() << "), "
+ << "Name(\"" << getName() << "\"), "
+ << "FullName(\"" << getFullName() << "\"), "
+ << "LinkageName(\"" << getLinkageName() << "\"), "
+ << "File(" << getFile() << "),"
+ << "Line(" << getLine() << "),"
+ << "Type(" << getType() << "), "
+ << "IsStatic(" << (isStatic() ? "true" : "false") << "), "
+ << "IsDefinition(" << (isDefinition() ? "true" : "false") << "), "
+ << "Global(" << Global << ")\n";
}
#endif
@@ -1168,18 +1166,18 @@ const char *SubprogramDesc::getAnchorString() const {
#ifndef NDEBUG
void SubprogramDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "), "
- << "Anchor(" << getAnchor() << "), "
- << "Name(\"" << getName() << "\"), "
- << "FullName(\"" << getFullName() << "\"), "
- << "LinkageName(\"" << getLinkageName() << "\"), "
- << "File(" << getFile() << "),"
- << "Line(" << getLine() << "),"
- << "Type(" << getType() << "), "
- << "IsStatic(" << (isStatic() ? "true" : "false") << "), "
- << "IsDefinition(" << (isDefinition() ? "true" : "false") << ")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "), "
+ << "Anchor(" << getAnchor() << "), "
+ << "Name(\"" << getName() << "\"), "
+ << "FullName(\"" << getFullName() << "\"), "
+ << "LinkageName(\"" << getLinkageName() << "\"), "
+ << "File(" << getFile() << "),"
+ << "Line(" << getLine() << "),"
+ << "Type(" << getType() << "), "
+ << "IsStatic(" << (isStatic() ? "true" : "false") << "), "
+ << "IsDefinition(" << (isDefinition() ? "true" : "false") << ")\n";
}
#endif
@@ -1217,10 +1215,10 @@ const char *BlockDesc::getTypeString() const {
#ifndef NDEBUG
void BlockDesc::dump() {
- std::cerr << getDescString() << " "
- << "Version(" << getVersion() << "), "
- << "Tag(" << getTag() << "),"
- << "Context(" << Context << ")\n";
+ cerr << getDescString() << " "
+ << "Version(" << getVersion() << "), "
+ << "Tag(" << getTag() << "),"
+ << "Context(" << Context << ")\n";
}
#endif
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp
index 8d10ff703b..876eb950d9 100644
--- a/lib/CodeGen/RegAllocLocal.cpp
+++ b/lib/CodeGen/RegAllocLocal.cpp
@@ -758,7 +758,7 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
for (unsigned i = MRegisterInfo::FirstVirtualRegister,
e = MF->getSSARegMap()->getLastVirtReg(); i <= e; ++i)
if (unsigned PR = Virt2PhysRegMap[i]) {
- std::cerr << "Register still mapped: " << i << " -> " << PR << "\n";
+ cerr << "Register still mapped: " << i << " -> " << PR << "\n";
AllOk = false;
}
assert(AllOk && "Virtual registers still in phys regs?");
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 2f8ad80e5c..b8439a62be 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -38,8 +38,6 @@
#include "llvm/Support/Compiler.h"
#include "llvm/Support/CommandLine.h"
#include <algorithm>
-#include <iostream>
-#include <algorithm>
using namespace llvm;
namespace {
@@ -101,9 +99,9 @@ namespace {
bool AddTo = true) {
assert(N->getNumValues() == NumTo && "Broken CombineTo call!");
++NodesCombined;
- DEBUG(std::cerr << "\nReplacing.1 "; N->dump();
- std::cerr << "\nWith: "; To[0].Val->dump(&DAG);
- std::cerr << " and " << NumTo-1 << " other values\n");
+ DOUT << "\nReplacing.1 "; DEBUG(N->dump());
+ DOUT << "\nWith: "; DEBUG(To[0].Val->dump(&DAG));
+ DOUT << " and " << NumTo-1 << " other values\n";
std::vector<SDNode*> NowDead;
DAG.ReplaceAllUsesWith(N, To, &NowDead);
@@ -152,9 +150,9 @@ namespace {
// Replace the old value with the new one.
++NodesCombined;
- DEBUG(std::cerr << "\nReplacing.2 "; TLO.Old.Val->dump();
- std::cerr << "\nWith: "; TLO.New.Val->dump(&DAG);
- std::cerr << '\n');
+ DOUT << "\nReplacing.2 "; DEBUG(TLO.Old.Val->dump());
+ DOUT << "\nWith: "; DEBUG(TLO.New.Val->dump(&DAG));
+ DOUT << '\n';
std::vector<SDNode*> NowDead;
DAG.ReplaceAllUsesOfValueWith(TLO.Old, TLO.New, NowDead);
@@ -455,9 +453,9 @@ void DAGCombiner::Run(bool RunningAfterLegalize) {
RV.Val->getOpcode() != ISD::DELETED_NODE &&
"Node was deleted but visit returned new node!");
- DEBUG(std::cerr << "\nReplacing.3 "; N->dump();
- std::cerr << "\nWith: "; RV.Val->dump(&DAG);
- std::cerr << '\n');
+ DOUT << "\nReplacing.3 "; DEBUG(N->dump());
+ DOUT << "\nWith: "; DEBUG(RV.Val->dump(&DAG));
+ DOUT << '\n';
std::vector<SDNode*> NowDead;
if (N->getNumValues() == RV.Val->getNumValues())
DAG.ReplaceAllUsesWith(N, RV.Val, &NowDead);
@@ -2801,9 +2799,9 @@ bool DAGCombiner::CombineToPreIndexedLoadStore(SDNode *N) {
Result = DAG.getIndexedStore(SDOperand(N,0), BasePtr, Offset, AM);
++PreIndexedNodes;
++NodesCombined;
- DEBUG(std::cerr << "\nReplacing.4 "; N->dump();
- std::cerr << "\nWith: "; Result.Val->dump(&DAG);
- std::cerr << '\n');
+ DOUT << "\nReplacing.4 "; DEBUG(N->dump());
+ DOUT << "\nWith: "; DEBUG(Result.Val->dump(&DAG));
+ DOUT << '\n';
std::vector<SDNode*> NowDead;
if (isLoad) {
DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), Result.getValue(0),
@@ -2924,9 +2922,9 @@ bool DAGCombiner::CombineToPostIndexedLoadStore(SDNode *N) {
: DAG.getIndexedStore(SDOperand(N,0), BasePtr, Offset, AM);
++PostIndexedNodes;
++NodesCombined;
- DEBUG(std::cerr << "\nReplacing.5 "; N->dump();
- std::cerr << "\nWith: "; Result.Val->dump(&DAG);
- std::cerr << '\n');
+ DOUT << "\nReplacing.5 "; DEBUG(N->dump());
+ DOUT << "\nWith: "; DEBUG(Result.Val->dump(&DAG));
+ DOUT << '\n';
std::vector<SDNode*> NowDead;
if (isLoad) {
DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), Result.getValue(0),
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index bf467b733d..0d8ca7bd2e 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -24,7 +24,6 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/ADT/SmallVector.h"
-#include <iostream>
#include <map>
using namespace llvm;
@@ -556,7 +555,7 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
}
// Otherwise this is an unhandled builtin node. splat.
#ifndef NDEBUG
- std::cerr << "NODE: "; Node->dump(); std::cerr << "\n";
+ cerr << "NODE: "; Node->dump(); cerr << "\n";
#endif
assert(0 && "Do not know how to legalize this operator!");
abort();
@@ -2975,7 +2974,7 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
assert(0 && "CopyFromReg must be legal!");
default:
#ifndef NDEBUG
- std::cerr << "NODE: "; Node->dump(); std::cerr << "\n";
+ cerr << "NODE: "; Node->dump(); cerr << "\n";
#endif
assert(0 && "Do not know how to promote this operator!");
abort();
@@ -4371,7 +4370,7 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
assert(0 && "CopyFromReg must be legal!");
default:
#ifndef NDEBUG
- std::cerr << "NODE: "; Node->dump(); std::cerr << "\n";
+ cerr << "NODE: "; Node->dump(); cerr << "\n";
#endif
assert(0 && "Do not know how to expand this operator!");
abort();
@@ -5020,7 +5019,7 @@ SDOperand SelectionDAGLegalize::PackVectorOp(SDOperand Op,
switch (Node->getOpcode()) {
default:
#ifndef NDEBUG
- Node->dump(); std::cerr << "\n";
+ Node->dump(); cerr << "\n";
#endif
assert(0 && "Unknown vector operation in PackVectorOp!");
case ISD::VADD:
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index 42b587f46c..d5448055a8 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -24,10 +24,8 @@
#include "llvm/Target/TargetLowering.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
-#include <iostream>
using namespace llvm;
-
/// BuildSchedUnits - Build SUnits from the selection dag that we are input.
/// This SUnit graph is similar to the SelectionDAG, but represents flagged
/// together nodes with a single SUnit.
@@ -430,9 +428,9 @@ void ScheduleDAG::EmitNode(SDNode *Node,
if (CommuteSet.count(Node)) {
MachineInstr *NewMI = TII->commuteInstruction(MI);
if (NewMI == 0)
- DEBUG(std::cerr << "Sched: COMMUTING FAILED!\n");
+ DOUT << "Sched: COMMUTING FAILED!\n";
else {
- DEBUG(std::cerr << "Sched: COMMUTED TO: " << *NewMI);
+ DOUT << "Sched: COMMUTED TO: " << *NewMI;
if (MI != NewMI) {
delete MI;
MI = NewMI;
@@ -614,7 +612,7 @@ void ScheduleDAG::dumpSchedule() const {
if (SUnit *SU = Sequence[i])
SU->dump(&DAG);
else
- std::cerr << "**** NOOP ****\n";
+ cerr << "**** NOOP ****\n";
}
}
@@ -634,14 +632,14 @@ MachineBasicBlock *ScheduleDAG::Run() {
/// SUnit - Scheduling unit. It's an wrapper around either a single SDNode or
/// a group of nodes flagged together.
void SUnit::dump(const SelectionDAG *G) const {
- std::cerr << "SU(" << NodeNum << "): ";
+ cerr << "SU(" << NodeNum << "): ";
Node->dump(G);
- std::cerr << "\n";
+ cerr << "\n";
if (FlaggedNodes.size() != 0) {
for (unsigned i = 0, e = FlaggedNodes.size(); i != e; i++) {
- std::cerr << " ";
+ cerr << " ";
FlaggedNodes[i]->dump(G);
- std::cerr << "\n";
+ cerr << "\n";
}
}
}
@@ -649,35 +647,35 @@ void SUnit::dump(const SelectionDAG *G) const {
void SUnit::dumpAll(const SelectionDAG *G) const {
dump(G);
- std::cerr << " # preds left : " << NumPredsLeft << "\n";
- std::cerr << " # succs left : " << NumSuccsLeft << "\n";
- std::cerr