[llvm-commits] CVS: llvm/lib/Analysis/InstCount.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Aug 29 09:44:01 PDT 2003


Changes in directory llvm/lib/Analysis:

InstCount.cpp updated: 1.4 -> 1.5

---
Log message:

There is no reason for this to be a pass!


---
Diffs of the changes:

Index: llvm/lib/Analysis/InstCount.cpp
diff -u llvm/lib/Analysis/InstCount.cpp:1.4 llvm/lib/Analysis/InstCount.cpp:1.5
--- llvm/lib/Analysis/InstCount.cpp:1.4	Sat Dec  7 17:24:24 2002
+++ llvm/lib/Analysis/InstCount.cpp	Fri Aug 29 09:43:17 2003
@@ -5,7 +5,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Pass.h"
-#include "llvm/Module.h"
+#include "llvm/Function.h"
 #include "llvm/Support/InstVisitor.h"
 #include "Support/Statistic.h"
 
@@ -19,7 +19,7 @@
 
 #include "llvm/Instruction.def"
 
-  class InstCount : public Pass, public InstVisitor<InstCount> {
+  class InstCount : public FunctionPass, public InstVisitor<InstCount> {
     friend class InstVisitor<InstCount>;
 
     void visitFunction  (Function &F) { ++TotalFuncs; }
@@ -35,7 +35,7 @@
       abort();
     }
   public:
-    virtual bool run(Module &M);
+    virtual bool runOnFunction(Function &F);
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.setPreservesAll();
@@ -51,7 +51,7 @@
 // InstCount::run - This is the main Analysis entry point for a
 // function.
 //
-bool InstCount::run(Module &M) {
-  visit(M);
+bool InstCount::runOnFunction(Function &F) {
+  visit(F);
   return false;
 }





More information about the llvm-commits mailing list