[llvm-commits] [llvm] r50696 - in /llvm/trunk/lib: Analysis/ CodeGen/ CodeGen/SelectionDAG/ Target/ Transforms/IPO/ Transforms/Instrumentation/ Transforms/Scalar/ Transforms/Utils/
Dan Gohman
gohman at apple.com
Mon May 5 18:53:17 PDT 2008
Author: djg
Date: Mon May 5 20:53:16 2008
New Revision: 50696
URL: http://llvm.org/viewvc/llvm-project?rev=50696&view=rev
Log:
Make several variable declarations static.
Modified:
llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp
llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp
llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp
llvm/trunk/lib/CodeGen/BranchFolding.cpp
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
llvm/trunk/lib/CodeGen/Passes.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/trunk/lib/Target/TargetMachine.cpp
llvm/trunk/lib/Transforms/IPO/Inliner.cpp
llvm/trunk/lib/Transforms/IPO/Internalize.cpp
llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp
llvm/trunk/lib/Transforms/Instrumentation/RSProfiling.cpp
llvm/trunk/lib/Transforms/Scalar/LICM.cpp
llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp
llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp
Modified: llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp Mon May 5 20:53:16 2008
@@ -22,9 +22,9 @@
using namespace llvm;
namespace {
- cl::opt<bool>
+ static cl::opt<bool>
PrintAll("count-aa-print-all-queries", cl::ReallyHidden);
- cl::opt<bool>
+ static cl::opt<bool>
PrintAllFailures("count-aa-print-all-failed-queries", cl::ReallyHidden);
class VISIBILITY_HIDDEN AliasAnalysisCounter
Modified: llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp Mon May 5 20:53:16 2008
@@ -35,16 +35,17 @@
using namespace llvm;
namespace {
- cl::opt<bool> PrintAll("print-all-alias-modref-info", cl::ReallyHidden);
+ static cl::opt<bool>
+ PrintAll("print-all-alias-modref-info", cl::ReallyHidden);
- cl::opt<bool> PrintNoAlias("print-no-aliases", cl::ReallyHidden);
- cl::opt<bool> PrintMayAlias("print-may-aliases", cl::ReallyHidden);
- cl::opt<bool> PrintMustAlias("print-must-aliases", cl::ReallyHidden);
-
- cl::opt<bool> PrintNoModRef("print-no-modref", cl::ReallyHidden);
- cl::opt<bool> PrintMod("print-mod", cl::ReallyHidden);
- cl::opt<bool> PrintRef("print-ref", cl::ReallyHidden);
- cl::opt<bool> PrintModRef("print-modref", cl::ReallyHidden);
+ static cl::opt<bool> PrintNoAlias("print-no-aliases", cl::ReallyHidden);
+ static cl::opt<bool> PrintMayAlias("print-may-aliases", cl::ReallyHidden);
+ static cl::opt<bool> PrintMustAlias("print-must-aliases", cl::ReallyHidden);
+
+ static cl::opt<bool> PrintNoModRef("print-no-modref", cl::ReallyHidden);
+ static cl::opt<bool> PrintMod("print-mod", cl::ReallyHidden);
+ static cl::opt<bool> PrintRef("print-ref", cl::ReallyHidden);
+ static cl::opt<bool> PrintModRef("print-modref", cl::ReallyHidden);
class VISIBILITY_HIDDEN AAEval : public FunctionPass {
unsigned NoAlias, MayAlias, MustAlias;
@@ -75,7 +76,7 @@
};
char AAEval::ID = 0;
- RegisterPass<AAEval>
+ static RegisterPass<AAEval>
X("aa-eval", "Exhaustive Alias Analysis Precision Evaluator", false, true);
}
Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Mon May 5 20:53:16 2008
@@ -31,7 +31,7 @@
namespace {
// Control the calculation of non-local dependencies by only examining the
// predecessors if the basic block has less than X amount (50 by default).
- cl::opt<int>
+ static cl::opt<int>
PredLimit("nonlocaldep-threshold", cl::Hidden, cl::init(50),
cl::desc("Control the calculation of non-local"
"dependencies (default = 50)"));
Modified: llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp (original)
+++ llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp Mon May 5 20:53:16 2008
@@ -24,7 +24,7 @@
using namespace llvm;
namespace {
- cl::opt<std::string>
+ static cl::opt<std::string>
ProfileInfoFilename("profile-info-file", cl::init("llvmprof.out"),
cl::value_desc("filename"),
cl::desc("Profile file loaded by -profile-loader"));
Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original)
+++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Mon May 5 20:53:16 2008
@@ -40,7 +40,7 @@
cl::init(cl::BOU_UNSET), cl::Hidden);
namespace {
// Throttle for huge numbers of predecessors (compile speed problems)
- cl::opt<unsigned>
+ static cl::opt<unsigned>
TailMergeThreshold("tail-merge-threshold",
cl::desc("Max number of predecessors to consider tail merging"),
cl::init(100), cl::Hidden);
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Mon May 5 20:53:16 2008
@@ -38,13 +38,13 @@
namespace {
// Hidden options for help debugging.
- cl::opt<bool> DisableReMat("disable-rematerialization",
- cl::init(false), cl::Hidden);
+ static cl::opt<bool> DisableReMat("disable-rematerialization",
+ cl::init(false), cl::Hidden);
- cl::opt<bool> SplitAtBB("split-intervals-at-bb",
- cl::init(true), cl::Hidden);
- cl::opt<int> SplitLimit("split-limit",
- cl::init(-1), cl::Hidden);
+ static cl::opt<bool> SplitAtBB("split-intervals-at-bb",
+ cl::init(true), cl::Hidden);
+ static cl::opt<int> SplitLimit("split-limit",
+ cl::init(-1), cl::Hidden);
}
STATISTIC(numIntervals, "Number of original intervals");
Modified: llvm/trunk/lib/CodeGen/Passes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Passes.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/Passes.cpp (original)
+++ llvm/trunk/lib/CodeGen/Passes.cpp Mon May 5 20:53:16 2008
@@ -31,6 +31,7 @@
///
//===---------------------------------------------------------------------===//
namespace {
+ static
cl::opt<RegisterRegAlloc::FunctionPassCtor, false,
RegisterPassParser<RegisterRegAlloc> >
RegAlloc("regalloc",
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon May 5 20:53:16 2008
@@ -75,8 +75,8 @@
///
//===---------------------------------------------------------------------===//
namespace {
- cl::opt<RegisterScheduler::FunctionPassCtor, false,
- RegisterPassParser<RegisterScheduler> >
+ static cl::opt<RegisterScheduler::FunctionPassCtor, false,
+ RegisterPassParser<RegisterScheduler> >
ISHeuristic("pre-RA-sched",
cl::init(&createDefaultScheduler),
cl::desc("Instruction schedulers available (before register"
Modified: llvm/trunk/lib/Target/TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/TargetMachine.cpp Mon May 5 20:53:16 2008
@@ -138,13 +138,13 @@
cl::location(OptimizeForSize),
cl::init(false));
- cl::opt<bool, true>
+ static cl::opt<bool, true>
EnableRealignStack("realign-stack",
cl::desc("Realign stack if needed"),
cl::location(RealignStack),
cl::init(true));
- cl::opt<unsigned, true>
+ static cl::opt<unsigned, true>
OverrideStackAlignment("stack-alignment",
cl::desc("Override default stack alignment"),
cl::location(StackAlignment),
Modified: llvm/trunk/lib/Transforms/IPO/Inliner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Inliner.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Inliner.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Inliner.cpp Mon May 5 20:53:16 2008
@@ -31,7 +31,7 @@
STATISTIC(NumDeleted, "Number of functions deleted because all callers found");
namespace {
- cl::opt<int>
+ static cl::opt<int>
InlineLimit("inline-threshold", cl::Hidden, cl::init(200),
cl::desc("Control the amount of inlining to perform (default = 200)"));
}
Modified: llvm/trunk/lib/Transforms/IPO/Internalize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Internalize.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Internalize.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Internalize.cpp Mon May 5 20:53:16 2008
@@ -32,12 +32,12 @@
// APIFile - A file which contains a list of symbols that should not be marked
// external.
- cl::opt<std::string>
+ static cl::opt<std::string>
APIFile("internalize-public-api-file", cl::value_desc("filename"),
cl::desc("A file containing list of symbol names to preserve"));
// APIList - A list of symbols that should not be marked internal.
- cl::list<std::string>
+ static cl::list<std::string>
APIList("internalize-public-api-list", cl::value_desc("list"),
cl::desc("A list of symbol names to preserve"),
cl::CommaSeparated);
Modified: llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp Mon May 5 20:53:16 2008
@@ -149,7 +149,7 @@
namespace {
// BlockFile - A file which contains a list of blocks that should not be
// extracted.
- cl::opt<std::string>
+ static cl::opt<std::string>
BlockFile("extract-blocks-file", cl::value_desc("filename"),
cl::desc("A file containing list of basic blocks to not extract"),
cl::Hidden);
Modified: llvm/trunk/lib/Transforms/Instrumentation/RSProfiling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/RSProfiling.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/RSProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/RSProfiling.cpp Mon May 5 20:53:16 2008
@@ -56,7 +56,7 @@
GBV, GBVO, HOSTCC
};
- cl::opt<RandomMeth> RandomMethod("profile-randomness",
+ static cl::opt<RandomMeth> RandomMethod("profile-randomness",
cl::desc("How to randomly choose to profile:"),
cl::values(
clEnumValN(GBV, "global", "global counter"),
Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Mon May 5 20:53:16 2008
@@ -59,7 +59,7 @@
STATISTIC(NumPromoted , "Number of memory locations promoted to registers");
namespace {
- cl::opt<bool>
+ static cl::opt<bool>
DisablePromotion("disable-licm-promotion", cl::Hidden,
cl::desc("Disable memory promotion in LICM pass"));
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp Mon May 5 20:53:16 2008
@@ -45,12 +45,12 @@
STATISTIC(NumUnrolled, "Number of loops unrolled (completely or otherwise)");
namespace {
- cl::opt<unsigned>
+ static cl::opt<unsigned>
UnrollThreshold
("unroll-threshold", cl::init(100), cl::Hidden,
cl::desc("The cut-off point for automatic loop unrolling"));
- cl::opt<unsigned>
+ static cl::opt<unsigned>
UnrollCount
("unroll-count", cl::init(0), cl::Hidden,
cl::desc("Use this unroll count for all loops, for testing purposes"));
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Mon May 5 20:53:16 2008
@@ -55,7 +55,7 @@
STATISTIC(NumSimplify, "Number of simplifications of unswitched code");
namespace {
- cl::opt<unsigned>
+ static cl::opt<unsigned>
Threshold("loop-unswitch-threshold", cl::desc("Max loop size to unswitch"),
cl::init(10), cl::Hidden);
Modified: llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp?rev=50696&r1=50695&r2=50696&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp Mon May 5 20:53:16 2008
@@ -27,7 +27,7 @@
using namespace llvm;
namespace {
- cl::opt<unsigned>
+ static cl::opt<unsigned>
BasicInlineThreshold("inline-threshold", cl::Hidden, cl::init(200),
cl::desc("Control the amount of basic inlining to perform (default = 200)"));
}
More information about the llvm-commits
mailing list