Move debug options out of header files so that the header does not have
authorChris Lattner <sabre@nondot.org>
Wed, 22 May 2002 17:08:27 +0000 (17:08 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 22 May 2002 17:08:27 +0000 (17:08 +0000)
to #include CommandLine.h.

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

lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp
lib/CodeGen/InstrSched/InstrScheduling.cpp
lib/CodeGen/InstrSched/SchedPriorities.h
lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
lib/Target/SparcV9/InstrSched/InstrScheduling.cpp
lib/Target/SparcV9/InstrSched/SchedPriorities.h
lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp
lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp

index edf68868d47bc30a0743bef3c2fec821725daeb2..11056406124272746c0ec33c441057ed0ebe9955 100644 (file)
 #include "llvm/Support/CFG.h"
 #include "Support/PostOrderIterator.h"
 #include "Support/SetOperations.h"
+#include "Support/CommandLine.h"
 #include <iostream>
 
 AnalysisID FunctionLiveVarInfo::ID(AnalysisID::create<FunctionLiveVarInfo>());
 
-cl::Enum<LiveVarDebugLevel_t> DEBUG_LV("dlivevar", cl::Hidden,
+LiveVarDebugLevel_t DEBUG_LV;
+
+static cl::Enum<LiveVarDebugLevel_t> DEBUG_LV_opt(DEBUG_LV, "dlivevar", cl::Hidden,
   "enable live-variable debugging information",
   clEnumValN(LV_DEBUG_None   , "n", "disable debug output"),
   clEnumValN(LV_DEBUG_Normal , "y", "enable debug output"),
   clEnumValN(LV_DEBUG_Instr,   "i", "print live-var sets before/after every machine instrn"),
   clEnumValN(LV_DEBUG_Verbose, "v", "print def, use sets for every instrn also"), 0);
 
+
+
 //-----------------------------------------------------------------------------
 // Accessor Functions
 //-----------------------------------------------------------------------------
index 0a6d1ce35393b05b10c7d07edf4935e7f281ae05..2d2bc147268f85d7f3955690371c82ac7b1f1e01 100644 (file)
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/Instruction.h"
+#include "Support/CommandLine.h"
 #include <algorithm>
 using std::cerr;
 using std::vector;
 
-//************************* External Data Types *****************************/
+SchedDebugLevel_t SchedDebugLevel;
 
-cl::Enum<enum SchedDebugLevel_t> SchedDebugLevel("dsched", cl::Hidden,
+static cl::Enum<enum SchedDebugLevel_t> Opt(SchedDebugLevel,"dsched",cl::Hidden,
   "enable instruction scheduling debugging information",
   clEnumValN(Sched_NoDebugInfo,      "n", "disable debug output"),
   clEnumValN(Sched_Disable,        "off", "disable instruction scheduling"),
index 3f087d52249f2439919dacd28e68bb425eb80abc..a34557ca1542de96903e89a8d4f6c4ad7bafdcef 100644 (file)
@@ -24,7 +24,6 @@
 #include "SchedGraph.h"
 #include "llvm/CodeGen/InstrScheduling.h"
 #include "llvm/Target/MachineSchedInfo.h"
-#include "Support/CommandLine.h"
 #include <list>
 #include <ext/hash_set>
 #include <iostream>
@@ -44,7 +43,7 @@ enum SchedDebugLevel_t {
   Sched_PrintSchedGraphs,
 };
 
-extern cl::Enum<SchedDebugLevel_t> SchedDebugLevel;
+extern SchedDebugLevel_t SchedDebugLevel;
 
 //---------------------------------------------------------------------------
 // Function: instrIsFeasible
index ab9b1a7b1765ea5728da80dc0124c9db6c6727e4..bd0db117f0fed82e7b8324363461e5c02e4c4a63 100644 (file)
 #include "llvm/Type.h"
 #include "llvm/iOther.h"
 #include "llvm/CodeGen/RegAllocCommon.h"
+#include "Support/CommandLine.h"
 #include <iostream>
 #include <math.h>
 using std::cerr;
 
-
-// ***TODO: There are several places we add instructions. Validate the order
-//          of adding these instructions.
-
-cl::Enum<RegAllocDebugLevel_t> DEBUG_RA("dregalloc", cl::Hidden,
+RegAllocDebugLevel_t DEBUG_RA;
+static cl::Enum<RegAllocDebugLevel_t> DEBUG_RA_c(DEBUG_RA, "dregalloc",
+                                                 cl::Hidden,
   "enable register allocation debugging information",
   clEnumValN(RA_DEBUG_None   , "n", "disable debug output"),
   clEnumValN(RA_DEBUG_Normal , "y", "enable debug output"),
index 0a6d1ce35393b05b10c7d07edf4935e7f281ae05..2d2bc147268f85d7f3955690371c82ac7b1f1e01 100644 (file)
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/Instruction.h"
+#include "Support/CommandLine.h"
 #include <algorithm>
 using std::cerr;
 using std::vector;
 
-//************************* External Data Types *****************************/
+SchedDebugLevel_t SchedDebugLevel;
 
-cl::Enum<enum SchedDebugLevel_t> SchedDebugLevel("dsched", cl::Hidden,
+static cl::Enum<enum SchedDebugLevel_t> Opt(SchedDebugLevel,"dsched",cl::Hidden,
   "enable instruction scheduling debugging information",
   clEnumValN(Sched_NoDebugInfo,      "n", "disable debug output"),
   clEnumValN(Sched_Disable,        "off", "disable instruction scheduling"),
index 3f087d52249f2439919dacd28e68bb425eb80abc..a34557ca1542de96903e89a8d4f6c4ad7bafdcef 100644 (file)
@@ -24,7 +24,6 @@
 #include "SchedGraph.h"
 #include "llvm/CodeGen/InstrScheduling.h"
 #include "llvm/Target/MachineSchedInfo.h"
-#include "Support/CommandLine.h"
 #include <list>
 #include <ext/hash_set>
 #include <iostream>
@@ -44,7 +43,7 @@ enum SchedDebugLevel_t {
   Sched_PrintSchedGraphs,
 };
 
-extern cl::Enum<SchedDebugLevel_t> SchedDebugLevel;
+extern SchedDebugLevel_t SchedDebugLevel;
 
 //---------------------------------------------------------------------------
 // Function: instrIsFeasible
index edf68868d47bc30a0743bef3c2fec821725daeb2..11056406124272746c0ec33c441057ed0ebe9955 100644 (file)
 #include "llvm/Support/CFG.h"
 #include "Support/PostOrderIterator.h"
 #include "Support/SetOperations.h"
+#include "Support/CommandLine.h"
 #include <iostream>
 
 AnalysisID FunctionLiveVarInfo::ID(AnalysisID::create<FunctionLiveVarInfo>());
 
-cl::Enum<LiveVarDebugLevel_t> DEBUG_LV("dlivevar", cl::Hidden,
+LiveVarDebugLevel_t DEBUG_LV;
+
+static cl::Enum<LiveVarDebugLevel_t> DEBUG_LV_opt(DEBUG_LV, "dlivevar", cl::Hidden,
   "enable live-variable debugging information",
   clEnumValN(LV_DEBUG_None   , "n", "disable debug output"),
   clEnumValN(LV_DEBUG_Normal , "y", "enable debug output"),
   clEnumValN(LV_DEBUG_Instr,   "i", "print live-var sets before/after every machine instrn"),
   clEnumValN(LV_DEBUG_Verbose, "v", "print def, use sets for every instrn also"), 0);
 
+
+
 //-----------------------------------------------------------------------------
 // Accessor Functions
 //-----------------------------------------------------------------------------
index ab9b1a7b1765ea5728da80dc0124c9db6c6727e4..bd0db117f0fed82e7b8324363461e5c02e4c4a63 100644 (file)
 #include "llvm/Type.h"
 #include "llvm/iOther.h"
 #include "llvm/CodeGen/RegAllocCommon.h"
+#include "Support/CommandLine.h"
 #include <iostream>
 #include <math.h>
 using std::cerr;
 
-
-// ***TODO: There are several places we add instructions. Validate the order
-//          of adding these instructions.
-
-cl::Enum<RegAllocDebugLevel_t> DEBUG_RA("dregalloc", cl::Hidden,
+RegAllocDebugLevel_t DEBUG_RA;
+static cl::Enum<RegAllocDebugLevel_t> DEBUG_RA_c(DEBUG_RA, "dregalloc",
+                                                 cl::Hidden,
   "enable register allocation debugging information",
   clEnumValN(RA_DEBUG_None   , "n", "disable debug output"),
   clEnumValN(RA_DEBUG_Normal , "y", "enable debug output"),