Make several variable declarations static.
authorDan Gohman <gohman@apple.com>
Tue, 6 May 2008 01:53:16 +0000 (01:53 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 6 May 2008 01:53:16 +0000 (01:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50696 91177308-0d34-0410-b5e6-96231b3b80d8

17 files changed:
lib/Analysis/AliasAnalysisCounter.cpp
lib/Analysis/AliasAnalysisEvaluator.cpp
lib/Analysis/MemoryDependenceAnalysis.cpp
lib/Analysis/ProfileInfoLoaderPass.cpp
lib/CodeGen/BranchFolding.cpp
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/Passes.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/Target/TargetMachine.cpp
lib/Transforms/IPO/Inliner.cpp
lib/Transforms/IPO/Internalize.cpp
lib/Transforms/IPO/LoopExtractor.cpp
lib/Transforms/Instrumentation/RSProfiling.cpp
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Scalar/LoopUnroll.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Utils/BasicInliner.cpp

index 99b17661b25f0a0f304c8e6903308bba4e222981..9c42902a04c7b2cb9235428fee16bc04668e4251 100644 (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 
index c9865548ce1f2e19a01b623aae07440d0fbc098b..704ab8273cc7b64fb0a2bdb4f81e3d6fd689fa2b 100644 (file)
 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);
 }
 
index 161c2fed1c7112658c13715a9355be3746fea86d..8a59c3a74316a631ba9bc18552a3e5648f8cff78 100644 (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)"));           
index 07d96821aba715c6517f74777b0ec896a0541c47..e7612e1d821cb047bee7504579b6962711eb5db7 100644 (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"));
index 703addc6317b0badb2bad28e97be4f36dad6774e..0dd31b1893392d2c675a272a1fff51572d288a1e 100644 (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);
index d8ca141c6693da14588111428013878e16f10381..87c854bd0271483256c0a0eff38121004dc2d609 100644 (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");
index 6742146a3833aa5a63c469d661e3879230114e99..bcd67c5037f5a84ed032d4c34e5afe3adf466ecf 100644 (file)
@@ -31,6 +31,7 @@ MachinePassRegistry RegisterRegAlloc::Registry;
 ///
 //===---------------------------------------------------------------------===//
 namespace {
+  static
   cl::opt<RegisterRegAlloc::FunctionPassCtor, false,
           RegisterPassParser<RegisterRegAlloc> >
   RegAlloc("regalloc",
index 15e362984939cb7128cb9c8eb339a7824db98925..8c606b886b687c4498102320639ec364862f5efe 100644 (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"
index b19066a98d9a4ed6b907cb63ef953d744e6bbd1a..1065b095bc8c4c2571d341259c6ce2740e3e7b70 100644 (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),
index cb21b79bb2e7a35e5192ea9b413c821e3bb0bcae..f44e78429b62403f5a2273d4f40f78eb6870e0aa 100644 (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)"));
 }
index d7da798097b3823db5eeaefe76b160e9b9f001dd..f3adb5692f17bbab73317b129d6a2097fa82e910 100644 (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);
index a2aa4e306aa490a887037505cf136efdc96e6cea..54fc44252e783a8e7d8078c5cfcd6a8421f036b4 100644 (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);
index 15249c2e1ac654a16bb59d31520fd428961e4104..c22a29ff7a42c8f3b36f6eef2c9b7f8781c92c79 100644 (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"),
index 33bfbf0a7ac58b1d7e7c37afe82f89a84fce6ac0..2d535326d2a4022f6d79cb1c0bbef0121c5adb84 100644 (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"));
 
index 18acb03b1b3e7ce4d2712e572a723f070fb8bcbe..0db964125adb72a6e22de6af44cade057aba65d2 100644 (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"));
index 47751235304a25f2ac93f7e1cd229f6ccc9b399a..5af0a57a80f9fc4fde3d9b3ca5f9abe57ccf0f2a 100644 (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);
   
index 59deef54d9b8b6dad76a3194e2332584148f1412..a3f294d34212d81c07571ca8b319d89252e31a91 100644 (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)"));
 }