[llvm-commits] CVS: llvm/lib/Reoptimizer/Trigger/TriggerAuxillary.cpp

Anand Shukla ashukla at cs.uiuc.edu
Thu Jun 5 01:05:09 PDT 2003


Changes in directory llvm/lib/Reoptimizer/Trigger:

TriggerAuxillary.cpp updated: 1.4 -> 1.5

---
Log message:

Put in check so that it avoids forming traces with calls

---
Diffs of the changes:

Index: llvm/lib/Reoptimizer/Trigger/TriggerAuxillary.cpp
diff -u llvm/lib/Reoptimizer/Trigger/TriggerAuxillary.cpp:1.4 llvm/lib/Reoptimizer/Trigger/TriggerAuxillary.cpp:1.5
--- llvm/lib/Reoptimizer/Trigger/TriggerAuxillary.cpp:1.4	Sat May 31 21:35:06 2003
+++ llvm/lib/Reoptimizer/Trigger/TriggerAuxillary.cpp	Thu Jun  5 01:04:42 2003
@@ -21,6 +21,7 @@
 #include "llvm/iOther.h"
 #include "llvm/iPHINode.h"
 #include "llvm/iMemory.h"
+#include "llvm/iOperators.h"
 #include "llvm/Support/CFG.h"
 #include "TriggerAuxillary.h"
 #include <iostream>
@@ -608,4 +609,20 @@
     }
   }
   return true;
+}
+
+bool hasCall(vector<BasicBlock *> &vBB){
+  for(vector<BasicBlock *>::iterator VBI = vBB.begin(), VBE = vBB.end(); 
+      VBI != VBE; ++VBI){
+    for(BasicBlock::iterator BI = (*VBI)->begin(), BE = (*VBI)->end(); 
+	BI != BE; ++BI){
+      //std::cerr<<"Looking at:\n";
+      //std::cerr<<*BI;
+      if(CallInst *ci = dyn_cast<CallInst>(&*BI)){
+	//std::cerr<<"Found\n";
+	return true;
+      }
+    }
+  }
+  return false;
 }





More information about the llvm-commits mailing list