mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -26,9 +26,9 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph");
|
||||
Statistic<> NumBUInlines("budatastructures", "Number of graphs inlined");
|
||||
Statistic<> NumCallEdges("budatastructures", "Number of 'actual' call edges");
|
||||
Statistic MaxSCC("budatastructure", "Maximum SCC Size in Call Graph");
|
||||
Statistic NumBUInlines("budatastructures", "Number of graphs inlined");
|
||||
Statistic NumCallEdges("budatastructures", "Number of 'actual' call edges");
|
||||
|
||||
cl::opt<bool>
|
||||
AddGlobals("budatastructures-annotate-calls", cl::Hidden,
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<> DirCall("calltarget", "Number of direct calls");
|
||||
Statistic<> IndCall("calltarget", "Number of indirect calls");
|
||||
Statistic<> CompleteInd("calltarget", "Number of complete indirect calls");
|
||||
Statistic<> CompleteEmpty("calltarget", "Number of complete empty calls");
|
||||
Statistic DirCall("calltarget", "Number of direct calls");
|
||||
Statistic IndCall("calltarget", "Number of indirect calls");
|
||||
Statistic CompleteInd("calltarget", "Number of complete indirect calls");
|
||||
Statistic CompleteEmpty("calltarget", "Number of complete empty calls");
|
||||
|
||||
RegisterPass<CallTargetFinder> X("calltarget","Find Call Targets (uses DSA)");
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ using namespace llvm;
|
||||
namespace {
|
||||
RegisterPass<CompleteBUDataStructures>
|
||||
X("cbudatastructure", "'Complete' Bottom-up Data Structure Analysis");
|
||||
Statistic<> NumCBUInlines("cbudatastructures", "Number of graphs inlined");
|
||||
Statistic NumCBUInlines("cbudatastructures", "Number of graphs inlined");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,12 +34,12 @@ using namespace llvm;
|
||||
#define COLLAPSE_ARRAYS_AGGRESSIVELY 0
|
||||
|
||||
namespace {
|
||||
Statistic<> NumFolds ("dsa", "Number of nodes completely folded");
|
||||
Statistic<> NumCallNodesMerged("dsa", "Number of call nodes merged");
|
||||
Statistic<> NumNodeAllocated ("dsa", "Number of nodes allocated");
|
||||
Statistic<> NumDNE ("dsa", "Number of nodes removed by reachability");
|
||||
Statistic<> NumTrivialDNE ("dsa", "Number of nodes trivially removed");
|
||||
Statistic<> NumTrivialGlobalDNE("dsa", "Number of globals trivially removed");
|
||||
Statistic NumFolds ("dsa", "Number of nodes completely folded");
|
||||
Statistic NumCallNodesMerged("dsa", "Number of call nodes merged");
|
||||
Statistic NumNodeAllocated ("dsa", "Number of nodes allocated");
|
||||
Statistic NumDNE ("dsa", "Number of nodes removed by reachability");
|
||||
Statistic NumTrivialDNE ("dsa", "Number of nodes trivially removed");
|
||||
Statistic NumTrivialGlobalDNE("dsa", "Number of globals trivially removed");
|
||||
static cl::opt<unsigned>
|
||||
DSAFieldLimit("dsa-field-limit", cl::Hidden,
|
||||
cl::desc("Number of fields to track before collapsing a node"),
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<>
|
||||
Statistic
|
||||
NumGlobalsConstanted("ds-opt", "Number of globals marked constant");
|
||||
Statistic<>
|
||||
Statistic
|
||||
NumGlobalsIsolated("ds-opt", "Number of globals with references dropped");
|
||||
|
||||
class DSOpt : public ModulePass {
|
||||
|
||||
@@ -23,19 +23,19 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<> TotalNumCallees("totalcallees",
|
||||
Statistic TotalNumCallees("totalcallees",
|
||||
"Total number of callee functions at all indirect call sites");
|
||||
Statistic<> NumIndirectCalls("numindirect",
|
||||
Statistic NumIndirectCalls("numindirect",
|
||||
"Total number of indirect call sites in the program");
|
||||
Statistic<> NumPoolNodes("numpools",
|
||||
Statistic NumPoolNodes("numpools",
|
||||
"Number of allocation nodes that could be pool allocated");
|
||||
|
||||
// Typed/Untyped memory accesses: If DSA can infer that the types the loads
|
||||
// and stores are accessing are correct (ie, the node has not been collapsed),
|
||||
// increment the appropriate counter.
|
||||
Statistic<> NumTypedMemAccesses("numtypedmemaccesses",
|
||||
Statistic NumTypedMemAccesses("numtypedmemaccesses",
|
||||
"Number of loads/stores which are fully typed");
|
||||
Statistic<> NumUntypedMemAccesses("numuntypedmemaccesses",
|
||||
Statistic NumUntypedMemAccesses("numuntypedmemaccesses",
|
||||
"Number of loads/stores which are untyped");
|
||||
|
||||
class DSGraphStats : public FunctionPass, public InstVisitor<DSGraphStats> {
|
||||
|
||||
@@ -31,9 +31,9 @@ using namespace llvm;
|
||||
namespace {
|
||||
RegisterPass<EquivClassGraphs> X("eqdatastructure",
|
||||
"Equivalence-class Bottom-up Data Structure Analysis");
|
||||
Statistic<> NumEquivBUInlines("equivdatastructures",
|
||||
Statistic NumEquivBUInlines("equivdatastructures",
|
||||
"Number of graphs inlined");
|
||||
Statistic<> NumFoldGraphInlines("Inline equiv-class graphs bottom up",
|
||||
Statistic NumFoldGraphInlines("Inline equiv-class graphs bottom up",
|
||||
"Number of graphs inlined");
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ using namespace llvm;
|
||||
namespace {
|
||||
cl::opt<bool> OnlyPrintMain("only-print-main-ds", cl::ReallyHidden);
|
||||
cl::opt<bool> DontPrintAnything("dont-print-ds", cl::ReallyHidden);
|
||||
Statistic<> MaxGraphSize ("dsa", "Maximum graph size");
|
||||
Statistic<> NumFoldedNodes ("dsa", "Number of folded nodes (in final graph)");
|
||||
Statistic MaxGraphSize ("dsa", "Maximum graph size");
|
||||
Statistic NumFoldedNodes ("dsa", "Number of folded nodes (in final graph)");
|
||||
}
|
||||
|
||||
void DSNode::dump() const { print(llvm_cerr, 0); }
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace {
|
||||
RegisterPass<TDDataStructures> // Register the pass
|
||||
Y("tddatastructure", "Top-down Data Structure Analysis");
|
||||
|
||||
Statistic<> NumTDInlines("tddatastructures", "Number of graphs inlined");
|
||||
Statistic NumTDInlines("tddatastructures", "Number of graphs inlined");
|
||||
}
|
||||
|
||||
void TDDataStructures::markReachableFunctionsExternallyAccessible(DSNode *N,
|
||||
|
||||
Reference in New Issue
Block a user