diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-12-19 22:30:33 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-12-19 22:30:33 +0000 | 
| commit | 57ef942306c83d26160fa024313600f894c9c065 (patch) | |
| tree | 819fdd4a6902c358c8fb747860c5f1a6aba6ba30 /llvm/lib/Analysis/IPA | |
| parent | 1fa216f5726f70d0b1e918eaee57000eacce306c (diff) | |
| download | bcm5719-llvm-57ef942306c83d26160fa024313600f894c9c065.tar.gz bcm5719-llvm-57ef942306c83d26160fa024313600f894c9c065.zip  | |
eliminate static ctors from Statistics
llvm-svn: 32697
Diffstat (limited to 'llvm/lib/Analysis/IPA')
| -rw-r--r-- | llvm/lib/Analysis/IPA/Andersens.cpp | 17 | ||||
| -rw-r--r-- | llvm/lib/Analysis/IPA/GlobalsModRef.cpp | 24 | 
2 files changed, 14 insertions, 27 deletions
diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp index 69462279a9a..5d2841187a6 100644 --- a/llvm/lib/Analysis/IPA/Andersens.cpp +++ b/llvm/lib/Analysis/IPA/Andersens.cpp @@ -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 diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp index 7ae5e5be350..7c305b7a5ed 100644 --- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp @@ -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  | 

