mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
eliminate static ctors from Statistics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32697 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cbfdd1f840
commit
3b27d68c6a
@ -64,18 +64,13 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
STATISTIC(NumIters , "Number of iterations to reach convergence");
|
||||||
Statistic
|
STATISTIC(NumConstraints , "Number of constraints");
|
||||||
NumIters("anders-aa", "Number of iterations to reach convergence");
|
STATISTIC(NumNodes , "Number of nodes");
|
||||||
Statistic
|
STATISTIC(NumEscapingFunctions, "Number of internal functions that escape");
|
||||||
NumConstraints("anders-aa", "Number of constraints");
|
STATISTIC(NumIndirectCallees , "Number of indirect callees found");
|
||||||
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");
|
|
||||||
|
|
||||||
|
namespace {
|
||||||
class Andersens : public ModulePass, public AliasAnalysis,
|
class Andersens : public ModulePass, public AliasAnalysis,
|
||||||
private InstVisitor<Andersens> {
|
private InstVisitor<Andersens> {
|
||||||
/// Node class - This class is used to represent a memory object in the
|
/// Node class - This class is used to represent a memory object in the
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
#define DEBUG_TYPE "globalsmodref-aa"
|
||||||
#include "llvm/Analysis/Passes.h"
|
#include "llvm/Analysis/Passes.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
@ -29,23 +30,14 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
using namespace llvm;
|
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 {
|
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
|
/// FunctionRecord - One instance of this structure is stored for every
|
||||||
/// function in the program. Later, the entries for these functions are
|
/// function in the program. Later, the entries for these functions are
|
||||||
/// removed if the function is found to call an external function (in which
|
/// removed if the function is found to call an external function (in which
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
#define DEBUG_TYPE "instcount"
|
||||||
#include "llvm/Analysis/Passes.h"
|
#include "llvm/Analysis/Passes.h"
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
@ -20,17 +21,18 @@
|
|||||||
#include <ostream>
|
#include <ostream>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
STATISTIC(TotalInsts , "Number of instructions (of all types)");
|
||||||
Statistic TotalInsts ("instcount", "Number of instructions (of all types)");
|
STATISTIC(TotalBlocks, "Number of basic blocks");
|
||||||
Statistic TotalBlocks("instcount", "Number of basic blocks");
|
STATISTIC(TotalFuncs , "Number of non-external functions");
|
||||||
Statistic TotalFuncs ("instcount", "Number of non-external functions");
|
STATISTIC(TotalMemInst, "Number of memory instructions");
|
||||||
Statistic TotalMemInst("instcount", "Number of memory instructions");
|
|
||||||
|
|
||||||
#define HANDLE_INST(N, OPCODE, CLASS) \
|
#define HANDLE_INST(N, OPCODE, CLASS) \
|
||||||
Statistic Num##OPCODE##Inst("instcount", "Number of " #OPCODE " insts");
|
STATISTIC(Num ## OPCODE ## Inst, "Number of " #OPCODE " insts");
|
||||||
|
|
||||||
#include "llvm/Instruction.def"
|
#include "llvm/Instruction.def"
|
||||||
|
|
||||||
|
|
||||||
|
namespace {
|
||||||
class InstCount : public FunctionPass, public InstVisitor<InstCount> {
|
class InstCount : public FunctionPass, public InstVisitor<InstCount> {
|
||||||
friend class InstVisitor<InstCount>;
|
friend class InstVisitor<InstCount>;
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
#define DEBUG_TYPE "scalar-evolution"
|
||||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||||
#include "llvm/Constants.h"
|
#include "llvm/Constants.h"
|
||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
@ -82,32 +83,27 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
STATISTIC(NumBruteForceEvaluations,
|
||||||
|
"Number of brute force evaluations needed to "
|
||||||
|
"calculate high-order polynomial exit values");
|
||||||
|
STATISTIC(NumArrayLenItCounts,
|
||||||
|
"Number of trip counts computed with array length");
|
||||||
|
STATISTIC(NumTripCountsComputed,
|
||||||
|
"Number of loops with predictable loop counts");
|
||||||
|
STATISTIC(NumTripCountsNotComputed,
|
||||||
|
"Number of loops without predictable loop counts");
|
||||||
|
STATISTIC(NumBruteForceTripCountsComputed,
|
||||||
|
"Number of loops with trip counts computed by force");
|
||||||
|
|
||||||
|
cl::opt<unsigned>
|
||||||
|
MaxBruteForceIterations("scalar-evolution-max-iterations", cl::ReallyHidden,
|
||||||
|
cl::desc("Maximum number of iterations SCEV will "
|
||||||
|
"symbolically execute a constant derived loop"),
|
||||||
|
cl::init(100));
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
RegisterPass<ScalarEvolution>
|
RegisterPass<ScalarEvolution>
|
||||||
R("scalar-evolution", "Scalar Evolution Analysis");
|
R("scalar-evolution", "Scalar Evolution Analysis");
|
||||||
|
|
||||||
Statistic
|
|
||||||
NumBruteForceEvaluations("scalar-evolution",
|
|
||||||
"Number of brute force evaluations needed to "
|
|
||||||
"calculate high-order polynomial exit values");
|
|
||||||
Statistic
|
|
||||||
NumArrayLenItCounts("scalar-evolution",
|
|
||||||
"Number of trip counts computed with array length");
|
|
||||||
Statistic
|
|
||||||
NumTripCountsComputed("scalar-evolution",
|
|
||||||
"Number of loops with predictable loop counts");
|
|
||||||
Statistic
|
|
||||||
NumTripCountsNotComputed("scalar-evolution",
|
|
||||||
"Number of loops without predictable loop counts");
|
|
||||||
Statistic
|
|
||||||
NumBruteForceTripCountsComputed("scalar-evolution",
|
|
||||||
"Number of loops with trip counts computed by force");
|
|
||||||
|
|
||||||
cl::opt<unsigned>
|
|
||||||
MaxBruteForceIterations("scalar-evolution-max-iterations", cl::ReallyHidden,
|
|
||||||
cl::desc("Maximum number of iterations SCEV will "
|
|
||||||
"symbolically execute a constant derived loop"),
|
|
||||||
cl::init(100));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
Loading…
Reference in New Issue
Block a user