[llvm-commits] CVS: llvm/lib/Reoptimizer/BinInterface/LLVMTrace.cpp

Anand Shukla ashukla at cs.uiuc.edu
Sat May 31 21:37:26 PDT 2003


Changes in directory llvm/lib/Reoptimizer/BinInterface:

LLVMTrace.cpp updated: 1.1 -> 1.2

---
Log message:

supressed debug output

---
Diffs of the changes:

Index: llvm/lib/Reoptimizer/BinInterface/LLVMTrace.cpp
diff -u llvm/lib/Reoptimizer/BinInterface/LLVMTrace.cpp:1.1 llvm/lib/Reoptimizer/BinInterface/LLVMTrace.cpp:1.2
--- llvm/lib/Reoptimizer/BinInterface/LLVMTrace.cpp:1.1	Sat May 31 17:06:43 2003
+++ llvm/lib/Reoptimizer/BinInterface/LLVMTrace.cpp	Sat May 31 21:36:13 2003
@@ -30,7 +30,9 @@
 			 map<BasicBlock *, unsigned char> &removedBranch,
 			 unsigned int lastSecId, unsigned int cidOffset, 
 			 unsigned int unroll){
+#ifdef FOR_DEBUG
   cerr<<"Adding---------------------------\n";
+#endif
   for(map<BasicBlock *, unsigned int>::iterator MI = bbToCid.begin(),
 	ME = bbToCid.end(); MI != ME; ++MI){
 
@@ -51,15 +53,17 @@
       
       if(positions.size() == 0)
 	continue;
-
+#ifdef FOR_DEBUG
       cerr<<II;
       std::cerr<<"\t\tPushing back\n";
+#endif
       for(vector<unsigned int>::iterator PI = positions.begin(), 
 	    PE = positions.end(); PI != PE; ++PI){
 	uint64_t addr = getBasicBlockInfo(MI->first).first;
 	addr += (*PI)*4;
-
+#ifdef FOR_DEBUG
 	std::cerr<<"Section: "<< bbToSec[MI->first]<<" Last: "<<lastSecId<<"\n";
+#endif
 	if( bbToSec[MI->first] <= lastSecId)
 	  InstrToSec[II] = bbToSec[MI->first];
 	else
@@ -71,17 +75,22 @@
 	// removedBranch[MI->first]){
 	if(isBranchInstr(instr) && removedBranch[MI->first]){
 	  InstrToCid[II].push_back(MI->second+ *PI - 1);
+#ifdef FOR_DEBUG
 	  std::cerr<<(MI->second+ *PI - 1)<<"\n";
+#endif
 	}
 	else{
 	  InstrToCid[II].push_back(MI->second+ *PI);
+#ifdef FOR_DEBUG
 	  std::cerr<<(MI->second+ *PI)<<"\n";
+#endif
 	}
       }
     }
   }
+#ifdef FOR_DEBUG
   cerr<<"-------------------------------\n";
-
+#endif
   traceInstructions = cidOffset;
   unrollFactor = unroll;
   numberOfEpilogs = (lastSecId - 1);
@@ -115,11 +124,15 @@
 //Should be invoked BEFORE reduce()
 void LLVMTrace::moveInstrToSec(Instruction *I, unsigned int sec){
   if(InstrToCid.find(I) != InstrToCid.end()){
+#ifdef FOR_DEBUG
     std::cerr<<"Moving\n";
     std::cerr<<I;
+#endif
     for(vector<unsigned int>::iterator VI = InstrToCid[I].begin(),
 	  VE = InstrToCid[I].end(); VI != VE; ++VI){
+#ifdef FOR_DEBUG
       std::cerr<<"ID: "<<*VI<<"\n";
+#endif
       bb->moveToEnd(*VI, sec);
     }
   }





More information about the llvm-commits mailing list