[llvm-commits] [llvm] r79821 - in /llvm/trunk: lib/VMCore/ConstantsContext.h lib/VMCore/Type.cpp lib/VMCore/TypesContext.h lib/VMCore/ValueSymbolTable.cpp utils/TableGen/AsmWriterEmitter.cpp utils/TableGen/CodeGenDAGPatterns.cpp utils/TableGen/DAGISelEmitter.cpp
Chris Lattner
sabre at nondot.org
Sat Aug 22 21:44:12 PDT 2009
Author: lattner
Date: Sat Aug 22 23:44:11 2009
New Revision: 79821
URL: http://llvm.org/viewvc/llvm-project?rev=79821&view=rev
Log:
remove some DOUTs
Modified:
llvm/trunk/lib/VMCore/ConstantsContext.h
llvm/trunk/lib/VMCore/Type.cpp
llvm/trunk/lib/VMCore/TypesContext.h
llvm/trunk/lib/VMCore/ValueSymbolTable.cpp
llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
Modified: llvm/trunk/lib/VMCore/ConstantsContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantsContext.h?rev=79821&r1=79820&r2=79821&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/ConstantsContext.h (original)
+++ llvm/trunk/lib/VMCore/ConstantsContext.h Sat Aug 22 23:44:11 2009
@@ -20,6 +20,7 @@
#include "llvm/Operator.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Mutex.h"
#include "llvm/System/RWMutex.h"
#include <map>
@@ -773,7 +774,7 @@
}
void dump() const {
- DOUT << "Constant.cpp: ValueMap\n";
+ DEBUG(errs() << "Constant.cpp: ValueMap\n");
}
};
Modified: llvm/trunk/lib/VMCore/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Type.cpp?rev=79821&r1=79820&r2=79821&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Type.cpp (original)
+++ llvm/trunk/lib/VMCore/Type.cpp Sat Aug 22 23:44:11 2009
@@ -467,7 +467,7 @@
OpaqueType::OpaqueType(LLVMContext &C) : DerivedType(C, OpaqueTyID) {
setAbstract(true);
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *this << "\n";
+ DEBUG(errs() << "Derived new type: " << *this << "\n");
#endif
}
@@ -756,7 +756,7 @@
pImpl->IntegerTypes.add(IVT, ITy);
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *ITy << "\n";
+ DEBUG(errs() << "Derived new type: " << *ITy << "\n");
#endif
return ITy;
}
@@ -800,7 +800,7 @@
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << FT << "\n";
+ DEBUG(errs() << "Derived new type: " << FT << "\n");
#endif
return FT;
}
@@ -822,7 +822,7 @@
pImpl->ArrayTypes.add(AVT, AT = new ArrayType(ElementType, NumElements));
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *AT << "\n";
+ DEBUG(errs() << "Derived new type: " << *AT << "\n");
#endif
return AT;
}
@@ -855,7 +855,7 @@
pImpl->VectorTypes.add(PVT, PT = new VectorType(ElementType, NumElements));
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *PT << "\n";
+ DEBUG(errs() << "Derived new type: " << *PT << "\n");
#endif
return PT;
}
@@ -891,7 +891,7 @@
pImpl->StructTypes.add(STV, ST);
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *ST << "\n";
+ DEBUG(errs() << "Derived new type: " << *ST << "\n");
#endif
return ST;
}
@@ -944,7 +944,7 @@
pImpl->PointerTypes.add(PVT, PT = new PointerType(ValueType, AddressSpace));
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *PT << "\n";
+ DEBUG(errs() << "Derived new type: " << *PT << "\n");
#endif
return PT;
}
@@ -1004,14 +1004,14 @@
AbstractTypeUsers.erase(AbstractTypeUsers.begin()+i);
#ifdef DEBUG_MERGE_TYPES
- DOUT << " remAbstractTypeUser[" << (void*)this << ", "
- << *this << "][" << i << "] User = " << U << "\n";
+ DEBUG(errs() << " remAbstractTypeUser[" << (void*)this << ", "
+ << *this << "][" << i << "] User = " << U << "\n");
#endif
if (AbstractTypeUsers.empty() && getRefCount() == 0 && isAbstract()) {
#ifdef DEBUG_MERGE_TYPES
- DOUT << "DELETEing unused abstract type: <" << *this
- << ">[" << (void*)this << "]" << "\n";
+ DEBUG(errs() << "DELETEing unused abstract type: <" << *this
+ << ">[" << (void*)this << "]" << "\n");
#endif
this->destroy();
@@ -1037,9 +1037,9 @@
pImpl->AbstractTypeDescriptions.clear();
#ifdef DEBUG_MERGE_TYPES
- DOUT << "REFINING abstract type [" << (void*)this << " "
- << *this << "] to [" << (void*)NewType << " "
- << *NewType << "]!\n";
+ DEBUG(errs() << "REFINING abstract type [" << (void*)this << " "
+ << *this << "] to [" << (void*)NewType << " "
+ << *NewType << "]!\n");
#endif
// Make sure to put the type to be refined to into a holder so that if IT gets
@@ -1075,10 +1075,10 @@
unsigned OldSize = AbstractTypeUsers.size(); OldSize=OldSize;
#ifdef DEBUG_MERGE_TYPES
- DOUT << " REFINING user " << OldSize-1 << "[" << (void*)User
- << "] of abstract type [" << (void*)this << " "
- << *this << "] to [" << (void*)NewTy.get() << " "
- << *NewTy << "]!\n";
+ DEBUG(errs() << " REFINING user " << OldSize-1 << "[" << (void*)User
+ << "] of abstract type [" << (void*)this << " "
+ << *this << "] to [" << (void*)NewTy.get() << " "
+ << *NewTy << "]!\n");
#endif
User->refineAbstractType(this, NewTy);
@@ -1108,7 +1108,7 @@
//
void DerivedType::notifyUsesThatTypeBecameConcrete() {
#ifdef DEBUG_MERGE_TYPES
- DOUT << "typeIsREFINED type: " << (void*)this << " " << *this << "\n";
+ DEBUG(errs() << "typeIsREFINED type: " << (void*)this << " " << *this <<"\n");
#endif
LLVMContextImpl *pImpl = getContext().pImpl;
Modified: llvm/trunk/lib/VMCore/TypesContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/TypesContext.h?rev=79821&r1=79820&r2=79821&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/TypesContext.h (original)
+++ llvm/trunk/lib/VMCore/TypesContext.h Sat Aug 22 23:44:11 2009
@@ -304,8 +304,8 @@
void RefineAbstractType(TypeClass *Ty, const DerivedType *OldType,
const Type *NewType) {
#ifdef DEBUG_MERGE_TYPES
- DOUT << "RefineAbstractType(" << (void*)OldType << "[" << *OldType
- << "], " << (void*)NewType << " [" << *NewType << "])\n";
+ DEBUG(errs() << "RefineAbstractType(" << (void*)OldType << "[" << *OldType
+ << "], " << (void*)NewType << " [" << *NewType << "])\n");
#endif
// Otherwise, we are changing one subelement type into another. Clearly the
@@ -410,12 +410,12 @@
void print(const char *Arg) const {
#ifdef DEBUG_MERGE_TYPES
- DOUT << "TypeMap<>::" << Arg << " table contents:\n";
+ DEBUG(errs() << "TypeMap<>::" << Arg << " table contents:\n");
unsigned i = 0;
for (typename std::map<ValType, PATypeHolder>::const_iterator I
= Map.begin(), E = Map.end(); I != E; ++I)
- DOUT << " " << (++i) << ". " << (void*)I->second.get() << " "
- << *I->second.get() << "\n";
+ DEBUG(errs() << " " << (++i) << ". " << (void*)I->second.get() << " "
+ << *I->second.get() << "\n");
#endif
}
Modified: llvm/trunk/lib/VMCore/ValueSymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ValueSymbolTable.cpp?rev=79821&r1=79820&r2=79821&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/ValueSymbolTable.cpp (original)
+++ llvm/trunk/lib/VMCore/ValueSymbolTable.cpp Sat Aug 22 23:44:11 2009
@@ -38,7 +38,7 @@
// Try inserting the name, assuming it won't conflict.
if (vmap.insert(V->Name)) {
- //DOUT << " Inserted value: " << V->Name << ": " << *V << "\n";
+ //DEBUG(errs() << " Inserted value: " << V->Name << ": " << *V << "\n");
return;
}
@@ -62,14 +62,14 @@
// Newly inserted name. Success!
NewName.setValue(V);
V->Name = &NewName;
- //DEBUG(DOUT << " Inserted value: " << UniqueName << ": " << *V << "\n");
+ //DEBUG(errs() << " Inserted value: " << UniqueName << ": " << *V << "\n");
return;
}
}
}
void ValueSymbolTable::removeValueName(ValueName *V) {
- //DEBUG(DOUT << " Removing Value: " << V->getKeyData() << "\n");
+ //DEBUG(errs() << " Removing Value: " << V->getKeyData() << "\n");
// Remove the value from the symbol table.
vmap.remove(V);
}
@@ -82,7 +82,7 @@
ValueName &Entry = vmap.GetOrCreateValue(Name);
if (Entry.getValue() == 0) {
Entry.setValue(V);
- //DEBUG(DOUT << " Inserted value: " << Entry.getKeyData() << ": "
+ //DEBUG(errs() << " Inserted value: " << Entry.getKeyData() << ": "
// << *V << "\n");
return &Entry;
}
@@ -102,7 +102,7 @@
if (NewName.getValue() == 0) {
// Newly inserted name. Success!
NewName.setValue(V);
- //DEBUG(DOUT << " Inserted value: " << UniqueName << ": " << *V << "\n");
+ //DEBUG(errs() << " Inserted value: " << UniqueName << ": " << *V << "\n");
return &NewName;
}
}
@@ -112,10 +112,10 @@
// dump - print out the symbol table
//
void ValueSymbolTable::dump() const {
- //DOUT << "ValueSymbolTable:\n";
+ //DEBUG(errs() << "ValueSymbolTable:\n");
for (const_iterator I = begin(), E = end(); I != E; ++I) {
- //DOUT << " '" << I->getKeyData() << "' = ";
+ //DEBUG(errs() << " '" << I->getKeyData() << "' = ");
I->getValue()->dump();
- //DOUT << "\n";
+ //DEBUG(errs() << "\n");
}
}
Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=79821&r1=79820&r2=79821&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Sat Aug 22 23:44:11 2009
@@ -658,8 +658,8 @@
// If we don't have enough bits for this operand, don't include it.
if (NumBits > BitsLeft) {
- DOUT << "Not enough bits to densely encode " << NumBits
- << " more bits\n";
+ DEBUG(errs() << "Not enough bits to densely encode " << NumBits
+ << " more bits\n");
break;
}
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=79821&r1=79820&r2=79821&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Sat Aug 22 23:44:11 2009
@@ -135,14 +135,14 @@
//! Dump the dependent variable set:
void DumpDepVars(MultipleUseVarSet &DepVars) {
if (DepVars.empty()) {
- DOUT << "<empty set>";
+ DEBUG(errs() << "<empty set>");
} else {
- DOUT << "[ ";
+ DEBUG(errs() << "[ ");
for (MultipleUseVarSet::const_iterator i = DepVars.begin(), e = DepVars.end();
i != e; ++i) {
- DOUT << (*i) << " ";
+ DEBUG(errs() << (*i) << " ");
}
- DOUT << "]";
+ DEBUG(errs() << "]");
}
}
}
@@ -2381,7 +2381,7 @@
// GenerateVariants - Generate variants. For example, commutative patterns can
// match multiple ways. Add them to PatternsToMatch as well.
void CodeGenDAGPatterns::GenerateVariants() {
- DOUT << "Generating instruction variants.\n";
+ DEBUG(errs() << "Generating instruction variants.\n");
// Loop over all of the patterns we've collected, checking to see if we can
// generate variants of the instruction, through the exploitation of
@@ -2396,9 +2396,9 @@
MultipleUseVarSet DepVars;
std::vector<TreePatternNode*> Variants;
FindDepVars(PatternsToMatch[i].getSrcPattern(), DepVars);
- DOUT << "Dependent/multiply used variables: ";
+ DEBUG(errs() << "Dependent/multiply used variables: ");
DEBUG(DumpDepVars(DepVars));
- DOUT << "\n";
+ DEBUG(errs() << "\n");
GenerateVariantsOf(PatternsToMatch[i].getSrcPattern(), Variants, *this, DepVars);
assert(!Variants.empty() && "Must create at least original variant!");
@@ -2407,16 +2407,16 @@
if (Variants.empty()) // No variants for this pattern.
continue;
- DOUT << "FOUND VARIANTS OF: ";
- DEBUG(PatternsToMatch[i].getSrcPattern()->dump());
- DOUT << "\n";
+ DEBUG(errs() << "FOUND VARIANTS OF: ";
+ PatternsToMatch[i].getSrcPattern()->dump();
+ errs() << "\n");
for (unsigned v = 0, e = Variants.size(); v != e; ++v) {
TreePatternNode *Variant = Variants[v];
- DOUT << " VAR#" << v << ": ";
- DEBUG(Variant->dump());
- DOUT << "\n";
+ DEBUG(errs() << " VAR#" << v << ": ";
+ Variant->dump();
+ errs() << "\n");
// Scan to see if an instruction or explicit pattern already matches this.
bool AlreadyExists = false;
@@ -2427,7 +2427,7 @@
continue;
// Check to see if this variant already exists.
if (Variant->isIsomorphicTo(PatternsToMatch[p].getSrcPattern(), DepVars)) {
- DOUT << " *** ALREADY EXISTS, ignoring variant.\n";
+ DEBUG(errs() << " *** ALREADY EXISTS, ignoring variant.\n");
AlreadyExists = true;
break;
}
@@ -2443,7 +2443,7 @@
PatternsToMatch[i].getAddedComplexity()));
}
- DOUT << "\n";
+ DEBUG(errs() << "\n");
}
}
Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=79821&r1=79820&r2=79821&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Sat Aug 22 23:44:11 2009
@@ -2094,12 +2094,12 @@
EmitNodeTransforms(OS);
EmitPredicateFunctions(OS);
- DOUT << "\n\nALL PATTERNS TO MATCH:\n\n";
+ DEBUG(errs() << "\n\nALL PATTERNS TO MATCH:\n\n");
for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(), E = CGP.ptm_end();
I != E; ++I) {
- DOUT << "PATTERN: "; DEBUG(I->getSrcPattern()->dump());
- DOUT << "\nRESULT: "; DEBUG(I->getDstPattern()->dump());
- DOUT << "\n";
+ DEBUG(errs() << "PATTERN: "; I->getSrcPattern()->dump());
+ DEBUG(errs() << "\nRESULT: "; I->getDstPattern()->dump());
+ DEBUG(errs() << "\n");
}
// At this point, we have full information about the 'Patterns' we need to
More information about the llvm-commits
mailing list