Move all the SaveState options and stuff inton one spot at the top of the file.
authorBrian Gaeke <gaeke@uiuc.edu>
Wed, 10 Mar 2004 22:21:03 +0000 (22:21 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Wed, 10 Mar 2004 22:21:03 +0000 (22:21 +0000)
De-constify SaveStateToModule; we have to set both it and SaveRegAllocState
explicitly in the reoptimizer.
Make SaveRegAllocState an 'external location' option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12278 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp

index 9682c81ddc14072a524de3fee05d6e397a011db5..410c1203f86166fff53157f94795d3ff49e1ae0a 100644 (file)
@@ -51,12 +51,6 @@ namespace llvm {
 
 RegAllocDebugLevel_t DEBUG_RA;
 
-/// The reoptimizer wants to be able to grovel through the register
-/// allocator's state after it has done its job. This is a hack.
-///
-PhyRegAlloc::SavedStateMapTy ExportedFnAllocState;
-const bool SaveStateToModule = true;
-
 static cl::opt<RegAllocDebugLevel_t, true>
 DRA_opt("dregalloc", cl::Hidden, cl::location(DEBUG_RA),
         cl::desc("enable register allocation debugging information"),
@@ -69,8 +63,16 @@ DRA_opt("dregalloc", cl::Hidden, cl::location(DEBUG_RA),
   clEnumValN(RA_DEBUG_Verbose,     "v", "extra debug output"),
                    0));
 
-static cl::opt<bool>
-SaveRegAllocState("save-ra-state", cl::Hidden,
+/// The reoptimizer wants to be able to grovel through the register
+/// allocator's state after it has done its job. This is a hack.
+///
+PhyRegAlloc::SavedStateMapTy ExportedFnAllocState;
+bool SaveRegAllocState = false;
+bool SaveStateToModule = true;
+static cl::opt<bool, true>
+SaveRegAllocStateOpt("save-ra-state", cl::Hidden,
+                  cl::location (SaveRegAllocState),
+                  cl::init(false),
                   cl::desc("write reg. allocator state into module"));
 
 FunctionPass *getRegisterAllocator(TargetMachine &T) {