[llvm-commits] CVS: llvm/lib/Transforms/Utils/CodeExtractor.cpp SimplifyCFG.cpp ValueMapper.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Jul 14 19:06:22 PDT 2004



Changes in directory llvm/lib/Transforms/Utils:

CodeExtractor.cpp updated: 1.25 -> 1.26
SimplifyCFG.cpp updated: 1.45 -> 1.46
ValueMapper.cpp updated: 1.13 -> 1.14

---
Log message:

Progress on PR341: http://llvm.cs.uiuc.edu/PR341 


---
Diffs of the changes:  (+9 -9)

Index: llvm/lib/Transforms/Utils/CodeExtractor.cpp
diff -u llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.25 llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.26
--- llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.25	Sun Jul  4 07:19:56 2004
+++ llvm/lib/Transforms/Utils/CodeExtractor.cpp	Wed Jul 14 21:06:11 2004
@@ -262,23 +262,23 @@
   for (Values::const_iterator i = inputs.begin(),
          e = inputs.end(); i != e; ++i) {
     const Value *value = *i;
-    DEBUG(std::cerr << "value used in func: " << value << "\n");
+    DEBUG(std::cerr << "value used in func: " << *value << "\n");
     paramTy.push_back(value->getType());
   }
 
   // Add the types of the output values to the function's argument list.
   for (Values::const_iterator I = outputs.begin(), E = outputs.end();
        I != E; ++I) {
-    DEBUG(std::cerr << "instr used in func: " << *I << "\n");
+    DEBUG(std::cerr << "instr used in func: " << **I << "\n");
     if (AggregateArgs)
       paramTy.push_back((*I)->getType());
     else
       paramTy.push_back(PointerType::get((*I)->getType()));
   }
 
-  DEBUG(std::cerr << "Function type: " << RetTy << " f(");
+  DEBUG(std::cerr << "Function type: " << *RetTy << " f(");
   DEBUG(for (std::vector<const Type*>::iterator i = paramTy.begin(),
-               e = paramTy.end(); i != e; ++i) std::cerr << *i << ", ");
+               e = paramTy.end(); i != e; ++i) std::cerr << **i << ", ");
   DEBUG(std::cerr << ")\n");
 
   if (AggregateArgs && (inputs.size() + outputs.size() > 0)) {


Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.45 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.46
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.45	Sun Jul  4 07:19:56 2004
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp	Wed Jul 14 21:06:12 2004
@@ -567,7 +567,7 @@
   // Remove basic blocks that have no predecessors... which are unreachable.
   if (pred_begin(BB) == pred_end(BB) ||
       *pred_begin(BB) == BB && ++pred_begin(BB) == pred_end(BB)) {
-    DEBUG(std::cerr << "Removing BB: \n" << BB);
+    DEBUG(std::cerr << "Removing BB: \n" << *BB);
 
     // Loop through all of our successors and make sure they know that one
     // of their predecessors is going away.
@@ -615,7 +615,7 @@
         // we cannot do this transformation!
         //
 	if (!PropagatePredecessorsForPHIs(BB, Succ)) {
-          DEBUG(std::cerr << "Killing Trivial BB: \n" << BB);
+          DEBUG(std::cerr << "Killing Trivial BB: \n" << *BB);
           std::string OldName = BB->getName();
 
           std::vector<BasicBlock*>
@@ -921,7 +921,7 @@
   }
 
   if (OnlySucc) {
-    DEBUG(std::cerr << "Merging: " << BB << "into: " << OnlyPred);
+    DEBUG(std::cerr << "Merging: " << *BB << "into: " << *OnlyPred);
     TerminatorInst *Term = OnlyPred->getTerminator();
 
     // Resolve any PHI nodes at the start of the block.  They are all


Index: llvm/lib/Transforms/Utils/ValueMapper.cpp
diff -u llvm/lib/Transforms/Utils/ValueMapper.cpp:1.13 llvm/lib/Transforms/Utils/ValueMapper.cpp:1.14
--- llvm/lib/Transforms/Utils/ValueMapper.cpp:1.13	Sun Jul  4 07:19:56 2004
+++ llvm/lib/Transforms/Utils/ValueMapper.cpp	Wed Jul 14 21:06:12 2004
@@ -112,8 +112,8 @@
     Value *V = MapValue(Op, ValueMap);
 #ifndef NDEBUG
     if (!V) {
-      std::cerr << "Val = \n" << Op << "Addr = " << (void*)Op;
-      std::cerr << "\nInst = " << I;
+      std::cerr << "Val = \n" << *Op << "Addr = " << (void*)Op;
+      std::cerr << "\nInst = " << *I;
     }
 #endif
     assert(V && "Referenced value not in value map!");





More information about the llvm-commits mailing list