[llvm-commits] CVS: llvm/lib/Analysis/IPA/Andersens.cpp GlobalsModRef.cpp
Chris Lattner
sabre at nondot.org
Tue Dec 19 14:30:50 PST 2006
Changes in directory llvm/lib/Analysis/IPA:
Andersens.cpp updated: 1.40 -> 1.41
GlobalsModRef.cpp updated: 1.25 -> 1.26
---
Log message:
eliminate static ctors from Statistics
---
Diffs of the changes: (+14 -27)
Andersens.cpp | 17 ++++++-----------
GlobalsModRef.cpp | 24 ++++++++----------------
2 files changed, 14 insertions(+), 27 deletions(-)
Index: llvm/lib/Analysis/IPA/Andersens.cpp
diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.40 llvm/lib/Analysis/IPA/Andersens.cpp:1.41
--- llvm/lib/Analysis/IPA/Andersens.cpp:1.40 Wed Dec 6 19:30:31 2006
+++ llvm/lib/Analysis/IPA/Andersens.cpp Tue Dec 19 16:30:33 2006
@@ -64,18 +64,13 @@
#include <set>
using namespace llvm;
-namespace {
- Statistic
- NumIters("anders-aa", "Number of iterations to reach convergence");
- Statistic
- NumConstraints("anders-aa", "Number of constraints");
- Statistic
- NumNodes("anders-aa", "Number of nodes");
- Statistic
- NumEscapingFunctions("anders-aa", "Number of internal functions that escape");
- Statistic
- NumIndirectCallees("anders-aa", "Number of indirect callees found");
+STATISTIC(NumIters , "Number of iterations to reach convergence");
+STATISTIC(NumConstraints , "Number of constraints");
+STATISTIC(NumNodes , "Number of nodes");
+STATISTIC(NumEscapingFunctions, "Number of internal functions that escape");
+STATISTIC(NumIndirectCallees , "Number of indirect callees found");
+namespace {
class Andersens : public ModulePass, public AliasAnalysis,
private InstVisitor<Andersens> {
/// Node class - This class is used to represent a memory object in the
Index: llvm/lib/Analysis/IPA/GlobalsModRef.cpp
diff -u llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.25 llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.26
--- llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.25 Wed Dec 6 11:46:31 2006
+++ llvm/lib/Analysis/IPA/GlobalsModRef.cpp Tue Dec 19 16:30:33 2006
@@ -14,6 +14,7 @@
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "globalsmodref-aa"
#include "llvm/Analysis/Passes.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
@@ -29,23 +30,14 @@
#include <set>
using namespace llvm;
+STATISTIC(NumNonAddrTakenGlobalVars,
+ "Number of global vars without address taken");
+STATISTIC(NumNonAddrTakenFunctions,"Number of functions without address taken");
+STATISTIC(NumNoMemFunctions, "Number of functions that do not access memory");
+STATISTIC(NumReadMemFunctions, "Number of functions that only read memory");
+STATISTIC(NumIndirectGlobalVars, "Number of indirect global objects");
+
namespace {
- Statistic
- NumNonAddrTakenGlobalVars("globalsmodref-aa",
- "Number of global vars without address taken");
- Statistic
- NumNonAddrTakenFunctions("globalsmodref-aa",
- "Number of functions without address taken");
- Statistic
- NumNoMemFunctions("globalsmodref-aa",
- "Number of functions that do not access memory");
- Statistic
- NumReadMemFunctions("globalsmodref-aa",
- "Number of functions that only read memory");
- Statistic
- NumIndirectGlobalVars("globalsmodref-aa",
- "Number of indirect global objects");
-
/// FunctionRecord - One instance of this structure is stored for every
/// function in the program. Later, the entries for these functions are
/// removed if the function is found to call an external function (in which
More information about the llvm-commits
mailing list