Make several variable declarations static.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50696 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-05-06 01:53:16 +00:00
parent 84b7df43fb
commit 4a3f6c8882
17 changed files with 36 additions and 34 deletions

View File

@ -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

View File

@ -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);
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);
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> 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 @@ namespace {
};
char AAEval::ID = 0;
RegisterPass<AAEval>
static RegisterPass<AAEval>
X("aa-eval", "Exhaustive Alias Analysis Precision Evaluator", false, true);
}

View File

@ -31,7 +31,7 @@ using namespace llvm;
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)"));

View File

@ -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"));

View File

@ -40,7 +40,7 @@ static cl::opt<cl::boolOrDefault> FlagEnableTailMerge("enable-tail-merge",
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);

View File

@ -38,13 +38,13 @@ using namespace llvm;
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");

View File

@ -31,6 +31,7 @@ MachinePassRegistry RegisterRegAlloc::Registry;
///
//===---------------------------------------------------------------------===//
namespace {
static
cl::opt<RegisterRegAlloc::FunctionPassCtor, false,
RegisterPassParser<RegisterRegAlloc> >
RegAlloc("regalloc",

View File

@ -75,8 +75,8 @@ MachinePassRegistry RegisterScheduler::Registry;
///
//===---------------------------------------------------------------------===//
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"

View File

@ -138,13 +138,13 @@ namespace {
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),

View File

@ -31,7 +31,7 @@ STATISTIC(NumInlined, "Number of functions inlined");
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)"));
}

View File

@ -32,12 +32,12 @@ namespace {
// 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);

View File

@ -149,7 +149,7 @@ FunctionPass *llvm::createSingleLoopExtractorPass() {
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);

View File

@ -56,7 +56,7 @@ namespace {
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"),

View File

@ -59,7 +59,7 @@ STATISTIC(NumMovedCalls, "Number of call insts hoisted or sunk");
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"));

View File

@ -45,12 +45,12 @@ STATISTIC(NumCompletelyUnrolled, "Number of loops completely unrolled");
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"));

View File

@ -55,7 +55,7 @@ STATISTIC(NumTrivial , "Number of unswitches that are trivial");
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);

View File

@ -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)"));
}