From 5ff62e90d0bc321206023897edc1e2691cb0fbb6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 22 Jul 2002 02:10:13 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2985 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp | 16 ++++--- lib/CodeGen/InstrSched/InstrScheduling.cpp | 17 ++++---- lib/CodeGen/InstrSelection/InstrSelection.cpp | 14 ++++--- lib/CodeGen/RegAlloc/PhyRegAlloc.cpp | 12 +++--- lib/ExecutionEngine/Interpreter/Execution.cpp | 21 +++++++--- lib/Support/Statistic.cpp | 12 +++++- .../SparcV9/InstrSched/InstrScheduling.cpp | 17 ++++---- .../SparcV9/InstrSelection/InstrSelection.cpp | 14 ++++--- .../SparcV9/LiveVar/FunctionLiveVarInfo.cpp | 16 ++++--- lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp | 12 +++--- lib/Transforms/IPO/OldPoolAllocate.cpp | 13 ++++-- .../Instrumentation/TraceValues.cpp | 14 +++---- lib/Transforms/LevelRaise.cpp | 29 ++++++++----- lib/VMCore/Pass.cpp | 31 ++++++++------ support/lib/Support/Statistic.cpp | 12 +++++- support/lib/Support/StatisticReporter.cpp | 12 +++++- tools/as/as.cpp | 16 +++++-- tools/dis/dis.cpp | 23 ++++++---- tools/extract/extract.cpp | 13 +++++- tools/gccas/gccas.cpp | 27 ++++++++---- tools/gccld/gccld.cpp | 34 ++++++++++----- tools/link/link.cpp | 30 ++++++++----- tools/llc/llc.cpp | 29 +++++++++---- tools/lli/lli.cpp | 42 ++++++++++++------- tools/llvm-as/as.cpp | 16 +++++-- tools/llvm-as/llvm-as.cpp | 16 +++++-- tools/llvm-dis/dis.cpp | 23 ++++++---- tools/llvm-dis/llvm-dis.cpp | 23 ++++++---- tools/llvm-extract/llvm-extract.cpp | 13 +++++- tools/llvm-link/llvm-link.cpp | 30 ++++++++----- tools/opt/opt.cpp | 30 +++++++++---- 31 files changed, 425 insertions(+), 202 deletions(-) diff --git a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp index 774bdc7cd7b..b080ec2f3e2 100644 --- a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp +++ b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp @@ -19,12 +19,16 @@ AnalysisID FunctionLiveVarInfo::ID(AnalysisID::create()); LiveVarDebugLevel_t DEBUG_LV; -static cl::Enum 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); +static cl::opt +DEBUG_LV_opt("dlivevar", cl::Hidden, cl::location(DEBUG_LV), + cl::desc("enable live-variable debugging information"), + cl::values( +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)); diff --git a/lib/CodeGen/InstrSched/InstrScheduling.cpp b/lib/CodeGen/InstrSched/InstrScheduling.cpp index 6ea37247d09..1d4c18058f3 100644 --- a/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/lib/CodeGen/InstrSched/InstrScheduling.cpp @@ -21,13 +21,16 @@ using std::vector; SchedDebugLevel_t SchedDebugLevel; -static cl::Enum Opt(SchedDebugLevel,"dsched",cl::Hidden, - "enable instruction scheduling debugging information", - clEnumValN(Sched_NoDebugInfo, "n", "disable debug output"), - clEnumValN(Sched_Disable, "off", "disable instruction scheduling"), - clEnumValN(Sched_PrintMachineCode, "y", "print machine code after scheduling"), - clEnumValN(Sched_PrintSchedTrace, "t", "print trace of scheduling actions"), - clEnumValN(Sched_PrintSchedGraphs, "g", "print scheduling graphs"), 0); +static cl::opt +SDL_opt("dsched", cl::Hidden, cl::location(SchedDebugLevel), + cl::desc("enable instruction scheduling debugging information"), + cl::values( + clEnumValN(Sched_NoDebugInfo, "n", "disable debug output"), + clEnumValN(Sched_Disable, "off", "disable instruction scheduling"), + clEnumValN(Sched_PrintMachineCode, "y", "print machine code after scheduling"), + clEnumValN(Sched_PrintSchedTrace, "t", "print trace of scheduling actions"), + clEnumValN(Sched_PrintSchedGraphs, "g", "print scheduling graphs"), + 0)); //************************* Internal Data Types *****************************/ diff --git a/lib/CodeGen/InstrSelection/InstrSelection.cpp b/lib/CodeGen/InstrSelection/InstrSelection.cpp index d61feb47979..86e54d0b165 100644 --- a/lib/CodeGen/InstrSelection/InstrSelection.cpp +++ b/lib/CodeGen/InstrSelection/InstrSelection.cpp @@ -26,7 +26,6 @@ #include "llvm/Function.h" #include "llvm/iPHINode.h" #include "Support/CommandLine.h" -#include using std::cerr; using std::vector; @@ -40,13 +39,18 @@ enum SelectDebugLevel_t { Select_DebugBurgTrees, }; + // Enable Debug Options to be specified on the command line -cl::Enum SelectDebugLevel("dselect", cl::Hidden, - "enable instruction selection debugging information", +static cl::opt +SelectDebugLevel("dselect", cl::Hidden, + cl::desc("enable instruction selection debugging information"), + cl::values( clEnumValN(Select_NoDebugInfo, "n", "disable debug output"), clEnumValN(Select_PrintMachineCode, "y", "print generated machine code"), - clEnumValN(Select_DebugInstTrees, "i", "print debugging info for instruction selection "), - clEnumValN(Select_DebugBurgTrees, "b", "print burg trees"), 0); + clEnumValN(Select_DebugInstTrees, "i", + "print debugging info for instruction selection"), + clEnumValN(Select_DebugBurgTrees, "b", "print burg trees"), + 0)); //******************** Forward Function Declarations ***********************/ diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp index ef4156147cb..a192310686d 100644 --- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp +++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp @@ -19,25 +19,25 @@ #include "llvm/Analysis/LoopInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/MachineFrameInfo.h" -#include "llvm/BasicBlock.h" #include "llvm/Function.h" #include "llvm/Type.h" #include "llvm/iOther.h" #include "llvm/CodeGen/RegAllocCommon.h" #include "Support/CommandLine.h" #include "Support/STLExtras.h" -#include #include using std::cerr; using std::vector; RegAllocDebugLevel_t DEBUG_RA; -static cl::Enum DEBUG_RA_c(DEBUG_RA, "dregalloc", - cl::Hidden, - "enable register allocation debugging information", +static cl::opt +DRA_opt("dregalloc", cl::Hidden, cl::location(DEBUG_RA), + cl::desc("enable register allocation debugging information"), + cl::values( clEnumValN(RA_DEBUG_None , "n", "disable debug output"), clEnumValN(RA_DEBUG_Normal , "y", "enable debug output"), - clEnumValN(RA_DEBUG_Verbose, "v", "enable extra debug output"), 0); + clEnumValN(RA_DEBUG_Verbose, "v", "enable extra debug output"), + 0)); //---------------------------------------------------------------------------- diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 68379f4e168..b2eb378b407 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -24,10 +24,18 @@ using std::vector; using std::cout; using std::cerr; -cl::Flag QuietMode ("quiet" , "Do not emit any non-program output"); -cl::Alias QuietModeA("q" , "Alias for -quiet", cl::NoFlags, QuietMode); -cl::Flag ArrayChecksEnabled("array-checks", "Enable array bound checks"); -cl::Flag AbortOnExceptions("abort-on-exception", "Halt execution on a machine exception"); +static cl::opt +QuietMode("quiet", cl::desc("Do not emit any non-program output")); + +static cl::alias +QuietModeA("q", cl::desc("Alias for -quiet"), cl::aliasopt(QuietMode)); + +static cl::opt +ArrayChecksEnabled("array-checks", cl::desc("Enable array bound checks")); + +static cl::opt +AbortOnExceptions("abort-on-exception", + cl::desc("Halt execution on a machine exception")); // Create a TargetData structure to handle memory addressing and size/alignment // computations @@ -37,8 +45,9 @@ CachedWriter CW; // Object to accelerate printing of LLVM #ifdef PROFILE_STRUCTURE_FIELDS -static cl::Flag ProfileStructureFields("profilestructfields", - "Profile Structure Field Accesses"); +static cl::opt +ProfileStructureFields("profilestructfields", + cl::desc("Profile Structure Field Accesses")); #include static std::map > FieldAccessCounts; #endif diff --git a/lib/Support/Statistic.cpp b/lib/Support/Statistic.cpp index 249955beeb8..a6b2dbdef6a 100644 --- a/lib/Support/Statistic.cpp +++ b/lib/Support/Statistic.cpp @@ -20,8 +20,16 @@ bool DebugFlag; // DebugFlag - Exported boolean set by the -debug option -static cl::Flag Enabled("stats", "Enable statistics output from program"); -static cl::Flag Debug(DebugFlag, "debug", "Enable debug output", cl::Hidden); +// -stats - Command line option to cause transformations to emit stats about +// what they did. +// +static cl::opt +Enabled("stats", cl::desc("Enable statistics output from program")); + +// -debug - Command line option to enable the DEBUG statements in the passes. +static cl::opt +Debug("debug", cl::desc("Enable debug output"), cl::Hidden, + cl::location(DebugFlag)); // Print information when destroyed, iff command line option is specified void StatisticBase::destroy() const { diff --git a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp index 6ea37247d09..1d4c18058f3 100644 --- a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp +++ b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp @@ -21,13 +21,16 @@ using std::vector; SchedDebugLevel_t SchedDebugLevel; -static cl::Enum Opt(SchedDebugLevel,"dsched",cl::Hidden, - "enable instruction scheduling debugging information", - clEnumValN(Sched_NoDebugInfo, "n", "disable debug output"), - clEnumValN(Sched_Disable, "off", "disable instruction scheduling"), - clEnumValN(Sched_PrintMachineCode, "y", "print machine code after scheduling"), - clEnumValN(Sched_PrintSchedTrace, "t", "print trace of scheduling actions"), - clEnumValN(Sched_PrintSchedGraphs, "g", "print scheduling graphs"), 0); +static cl::opt +SDL_opt("dsched", cl::Hidden, cl::location(SchedDebugLevel), + cl::desc("enable instruction scheduling debugging information"), + cl::values( + clEnumValN(Sched_NoDebugInfo, "n", "disable debug output"), + clEnumValN(Sched_Disable, "off", "disable instruction scheduling"), + clEnumValN(Sched_PrintMachineCode, "y", "print machine code after scheduling"), + clEnumValN(Sched_PrintSchedTrace, "t", "print trace of scheduling actions"), + clEnumValN(Sched_PrintSchedGraphs, "g", "print scheduling graphs"), + 0)); //************************* Internal Data Types *****************************/ diff --git a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp index d61feb47979..86e54d0b165 100644 --- a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp +++ b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp @@ -26,7 +26,6 @@ #include "llvm/Function.h" #include "llvm/iPHINode.h" #include "Support/CommandLine.h" -#include using std::cerr; using std::vector; @@ -40,13 +39,18 @@ enum SelectDebugLevel_t { Select_DebugBurgTrees, }; + // Enable Debug Options to be specified on the command line -cl::Enum SelectDebugLevel("dselect", cl::Hidden, - "enable instruction selection debugging information", +static cl::opt +SelectDebugLevel("dselect", cl::Hidden, + cl::desc("enable instruction selection debugging information"), + cl::values( clEnumValN(Select_NoDebugInfo, "n", "disable debug output"), clEnumValN(Select_PrintMachineCode, "y", "print generated machine code"), - clEnumValN(Select_DebugInstTrees, "i", "print debugging info for instruction selection "), - clEnumValN(Select_DebugBurgTrees, "b", "print burg trees"), 0); + clEnumValN(Select_DebugInstTrees, "i", + "print debugging info for instruction selection"), + clEnumValN(Select_DebugBurgTrees, "b", "print burg trees"), + 0)); //******************** Forward Function Declarations ***********************/ diff --git a/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp b/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp index 774bdc7cd7b..b080ec2f3e2 100644 --- a/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp +++ b/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp @@ -19,12 +19,16 @@ AnalysisID FunctionLiveVarInfo::ID(AnalysisID::create()); LiveVarDebugLevel_t DEBUG_LV; -static cl::Enum 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); +static cl::opt +DEBUG_LV_opt("dlivevar", cl::Hidden, cl::location(DEBUG_LV), + cl::desc("enable live-variable debugging information"), + cl::values( +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)); diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp index ef4156147cb..a192310686d 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp @@ -19,25 +19,25 @@ #include "llvm/Analysis/LoopInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/MachineFrameInfo.h" -#include "llvm/BasicBlock.h" #include "llvm/Function.h" #include "llvm/Type.h" #include "llvm/iOther.h" #include "llvm/CodeGen/RegAllocCommon.h" #include "Support/CommandLine.h" #include "Support/STLExtras.h" -#include #include using std::cerr; using std::vector; RegAllocDebugLevel_t DEBUG_RA; -static cl::Enum DEBUG_RA_c(DEBUG_RA, "dregalloc", - cl::Hidden, - "enable register allocation debugging information", +static cl::opt +DRA_opt("dregalloc", cl::Hidden, cl::location(DEBUG_RA), + cl::desc("enable register allocation debugging information"), + cl::values( clEnumValN(RA_DEBUG_None , "n", "disable debug output"), clEnumValN(RA_DEBUG_Normal , "y", "enable debug output"), - clEnumValN(RA_DEBUG_Verbose, "v", "enable extra debug output"), 0); + clEnumValN(RA_DEBUG_Verbose, "v", "enable extra debug output"), + 0)); //---------------------------------------------------------------------------- diff --git a/lib/Transforms/IPO/OldPoolAllocate.cpp b/lib/Transforms/IPO/OldPoolAllocate.cpp index 50f21e23978..eb463b8e136 100644 --- a/lib/Transforms/IPO/OldPoolAllocate.cpp +++ b/lib/Transforms/IPO/OldPoolAllocate.cpp @@ -52,13 +52,18 @@ enum PtrSize { Ptr8bits, Ptr16bits, Ptr32bits }; -static cl::Enum ReqPointerSize("ptrsize", 0, - "Set pointer size for -poolalloc pass", +static cl::opt +ReqPointerSize("poolalloc-ptr-size", + cl::desc("Set pointer size for -poolalloc pass"), + cl::values( clEnumValN(Ptr32bits, "32", "Use 32 bit indices for pointers"), clEnumValN(Ptr16bits, "16", "Use 16 bit indices for pointers"), - clEnumValN(Ptr8bits , "8", "Use 8 bit indices for pointers"), 0); + clEnumValN(Ptr8bits , "8", "Use 8 bit indices for pointers"), + 0)); -static cl::Flag DisableRLE("no-pool-load-elim", "Disable pool load elimination after poolalloc pass", cl::Hidden); +static cl::opt +DisableRLE("no-pool-load-elim", cl::Hidden, + cl::desc("Disable pool load elimination after poolalloc pass")); const Type *POINTERTYPE; diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp index 57230c6b77c..3d5ff45ccf2 100644 --- a/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/lib/Transforms/Instrumentation/TraceValues.cpp @@ -12,8 +12,6 @@ #include "llvm/iMemory.h" #include "llvm/iTerminators.h" #include "llvm/iOther.h" -#include "llvm/BasicBlock.h" -#include "llvm/Function.h" #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/Assembly/Writer.h" @@ -24,11 +22,13 @@ using std::vector; using std::string; -static cl::Flag DisablePtrHashing("tracedisablehashdisable", - "Disable pointer hashing", cl::NoFlags); +static cl::opt +DisablePtrHashing("tracedisablehashdisable", cl::Hidden, + cl::desc("Disable pointer hashing")); -static cl::StringList TraceFuncName ("tracefunc", "trace only specific funct" - "ions", cl::NoFlags); +static cl::list +TraceFuncName("tracefunc", cl::desc("trace only specific functions"), + cl::value_desc("function")); // We trace a particular function if no functions to trace were specified @@ -37,7 +37,7 @@ static cl::StringList TraceFuncName ("tracefunc", "trace only specific funct" inline bool TraceThisFunction(Function* func) { - if (TraceFuncName.getNumOccurances() == 0) + if (TraceFuncName.size() == 0) return true; return std::find(TraceFuncName.begin(), TraceFuncName.end(), func->getName()) diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp index 7e27c5f7f0b..b4d1755544a 100644 --- a/lib/Transforms/LevelRaise.cpp +++ b/lib/Transforms/LevelRaise.cpp @@ -26,17 +26,24 @@ using std::cerr; // raising pass to start at instruction "foo", which is immensely useful for // debugging! // -static cl::String StartInst("raise-start-inst", "Start raise pass at the " - "instruction with the specified name", cl::Hidden); - -static Statistic<> NumLoadStorePeepholes("raise\t\t- Number of load/store " - "peepholes"); -static Statistic<> NumGEPInstFormed("raise\t\t- Number of other " - "getelementptr's formed"); -static Statistic<> NumExprTreesConv("raise\t\t- Number of expression trees" - " converted"); -static Statistic<> NumCastOfCast("raise\t\t- Number of cast-of-self removed"); -static Statistic<> NumDCEorCP("raise\t\t- Number of insts DCEd or constprop'd"); +static cl::opt +StartInst("raise-start-inst", cl::Hidden, cl::value_desc("inst name"), + cl::desc("Start raise pass at the instruction with the specified name")); + +static Statistic<> +NumLoadStorePeepholes("raise\t\t- Number of load/store peepholes"); + +static Statistic<> +NumGEPInstFormed("raise\t\t- Number of other getelementptr's formed"); + +static Statistic<> +NumExprTreesConv("raise\t\t- Number of expression trees converted"); + +static Statistic<> +NumCastOfCast("raise\t\t- Number of cast-of-self removed"); + +static Statistic<> +NumDCEorCP("raise\t\t- Number of insts DCEd or constprop'd"); #define PRINT_PEEPHOLE(ID, NUM, I) \ diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index db2614e4527..4b29371fff8 100644 --- a/lib/VMCore/Pass.cpp +++ b/lib/VMCore/Pass.cpp @@ -81,8 +81,9 @@ bool PassManager::run(Module &M) { return PM->run(M); } // amount of time each pass takes to execute. This only happens with // -time-passes is enabled on the command line. // -static cl::Flag EnableTiming("time-passes", "Time each pass, printing elapsed" - " time for each on exit"); +static cl::opt +EnableTiming("time-passes", + cl::desc("Time each pass, printing elapsed time for each on exit")); static double getTime() { struct timeval T; @@ -143,24 +144,28 @@ TimingInfo::~TimingInfo() { // Different debug levels that can be enabled... enum PassDebugLevel { - None, PassStructure, PassExecutions, PassDetails + None, Structure, Executions, Details }; -static cl::Enum PassDebugging("debug-pass", cl::Hidden, - "Print PassManager debugging information", - clEnumVal(None , "disable debug output"), - clEnumVal(PassStructure , "print pass structure before run()"), - clEnumVal(PassExecutions, "print pass name before it is executed"), - clEnumVal(PassDetails , "print pass details when it is executed"), 0); +static cl::opt +PassDebugging("debug-pass", cl::Hidden, + cl::desc("Print PassManager debugging information"), + cl::values( + clEnumVal(None , "disable debug output"), + // TODO: add option to print out pass names "PassOptions" + clEnumVal(Structure , "print pass structure before run()"), + clEnumVal(Executions, "print pass name before it is executed"), + clEnumVal(Details , "print pass details when it is executed"), + 0)); void PMDebug::PrintPassStructure(Pass *P) { - if (PassDebugging >= PassStructure) + if (PassDebugging >= Structure) P->dumpPassStructure(); } void PMDebug::PrintPassInformation(unsigned Depth, const char *Action, Pass *P, Annotable *V) { - if (PassDebugging >= PassExecutions) { + if (PassDebugging >= Executions) { std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '" << P->getPassName(); if (V) { @@ -181,7 +186,7 @@ void PMDebug::PrintPassInformation(unsigned Depth, const char *Action, void PMDebug::PrintAnalysisSetInfo(unsigned Depth, const char *Msg, Pass *P, const std::vector &Set){ - if (PassDebugging >= PassDetails && !Set.empty()) { + if (PassDebugging >= Details && !Set.empty()) { std::cerr << (void*)P << std::string(Depth*2+3, ' ') << Msg << " Analyses:"; for (unsigned i = 0; i != Set.size(); ++i) { Pass *P = Set[i].createPass(); // Good thing this is just debug code... @@ -192,7 +197,7 @@ void PMDebug::PrintAnalysisSetInfo(unsigned Depth, const char *Msg, } } -// dumpPassStructure - Implement the -debug-passes=PassStructure option +// dumpPassStructure - Implement the -debug-passes=Structure option void Pass::dumpPassStructure(unsigned Offset = 0) { std::cerr << std::string(Offset*2, ' ') << getPassName() << "\n"; } diff --git a/support/lib/Support/Statistic.cpp b/support/lib/Support/Statistic.cpp index 249955beeb8..a6b2dbdef6a 100644 --- a/support/lib/Support/Statistic.cpp +++ b/support/lib/Support/Statistic.cpp @@ -20,8 +20,16 @@ bool DebugFlag; // DebugFlag - Exported boolean set by the -debug option -static cl::Flag Enabled("stats", "Enable statistics output from program"); -static cl::Flag Debug(DebugFlag, "debug", "Enable debug output", cl::Hidden); +// -stats - Command line option to cause transformations to emit stats about +// what they did. +// +static cl::opt +Enabled("stats", cl::desc("Enable statistics output from program")); + +// -debug - Command line option to enable the DEBUG statements in the passes. +static cl::opt +Debug("debug", cl::desc("Enable debug output"), cl::Hidden, + cl::location(DebugFlag)); // Print information when destroyed, iff command line option is specified void StatisticBase::destroy() const { diff --git a/support/lib/Support/StatisticReporter.cpp b/support/lib/Support/StatisticReporter.cpp index 249955beeb8..a6b2dbdef6a 100644 --- a/support/lib/Support/StatisticReporter.cpp +++ b/support/lib/Support/StatisticReporter.cpp @@ -20,8 +20,16 @@ bool DebugFlag; // DebugFlag - Exported boolean set by the -debug option -static cl::Flag Enabled("stats", "Enable statistics output from program"); -static cl::Flag Debug(DebugFlag, "debug", "Enable debug output", cl::Hidden); +// -stats - Command line option to cause transformations to emit stats about +// what they did. +// +static cl::opt +Enabled("stats", cl::desc("Enable statistics output from program")); + +// -debug - Command line option to enable the DEBUG statements in the passes. +static cl::opt +Debug("debug", cl::desc("Enable debug output"), cl::Hidden, + cl::location(DebugFlag)); // Print information when destroyed, iff command line option is specified void StatisticBase::destroy() const { diff --git a/tools/as/as.cpp b/tools/as/as.cpp index a956203e649..c66dd598b9b 100644 --- a/tools/as/as.cpp +++ b/tools/as/as.cpp @@ -18,10 +18,18 @@ #include using std::cerr; -cl::String InputFilename ("", "Parse file, compile to bytecode", 0, "-"); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags, ""); -cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false); -cl::Flag DumpAsm ("d", "Print assembly as parsed", cl::Hidden, false); +static cl::opt +InputFilename(cl::Positional, cl::desc(""), cl::init("-")); + +static cl::opt +OutputFilename("o", cl::desc("Override output filename"), + cl::value_desc("filename")); + +static cl::opt +Force("f", cl::desc("Overwrite output files")); + +static cl::opt +DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden); int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n"); diff --git a/tools/dis/dis.cpp b/tools/dis/dis.cpp index eb9a3a39ed0..361564c8e54 100644 --- a/tools/dis/dis.cpp +++ b/tools/dis/dis.cpp @@ -27,13 +27,22 @@ enum OutputMode { c, // Generate C code }; -cl::String InputFilename ("", "Load file, print as assembly", 0, "-"); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags, ""); -cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false); -cl::EnumFlags WriteMode(cl::NoFlags, - clEnumVal(llvm, "Output LLVM assembly"), - clEnumVal(c , "Output C code for program"), - 0); +static cl::opt +InputFilename(cl::Positional, cl::desc(""), cl::init("-")); + +static cl::opt +OutputFilename("o", cl::desc("Override output filename"), + cl::value_desc("filename")); + +static cl::opt +Force("f", cl::desc("Overwrite output files")); + +static cl::opt +WriteMode(cl::desc("Specify the output format:"), + cl::values( + clEnumVal(llvm, "Output LLVM assembly"), + clEnumVal(c , "Output C code for program"), + 0)); int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " llvm .bc -> .ll disassembler\n"); diff --git a/tools/extract/extract.cpp b/tools/extract/extract.cpp index d1680c09674..4730f54250a 100644 --- a/tools/extract/extract.cpp +++ b/tools/extract/extract.cpp @@ -18,8 +18,17 @@ #include "Support/CommandLine.h" #include -static cl::String InputFilename("", "Specify input bytecode file", 0, "-"); -static cl::String ExtractFunc("func", "Specify function to extract", 0, "main"); +// InputFilename - The filename to read from. +static cl::opt +InputFilename(cl::Positional, cl::desc(""), + cl::init("-"), cl::value_desc("filename")); + + +// ExtractFunc - The function to extract from the module... defaults to main. +static cl::opt +ExtractFunc("func", cl::desc("Specify function to extract"), cl::init("main"), + cl::value_desc("function")); + struct FunctionExtractorPass : public Pass { const char *getPassName() const { return "Function Extractor"; } diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp index 634d08c8510..fbb8f77afc6 100644 --- a/tools/gccas/gccas.cpp +++ b/tools/gccas/gccas.cpp @@ -23,14 +23,25 @@ #include using std::cerr; -static cl::String InputFilename ("", "Parse file, compile to bytecode", - cl::Required, ""); -static cl::String OutputFilename ("o", "Override output filename"); -static cl::Int RunNPasses ("stopAfterNPasses", "Only run the first N " - "passes of gccas", cl::Hidden); -static cl::Flag StopAtLevelRaise("stopraise", "Stop optimization before " - "level raise", cl::Hidden); -static cl::Flag Verify ("verify", "Verify each pass result"); +static cl::opt +InputFilename(cl::Positional, cl::desc(""), cl::Required); + +static cl::opt +OutputFilename("o", cl::desc("Override output filename"), + cl::value_desc("filename")); + +static cl::opt +RunNPasses("stopAfterNPasses", + cl::desc("Only run the first N passes of gccas"), cl::Hidden, + cl::value_desc("# passes")); + +static cl::opt +StopAtLevelRaise("stopraise", cl::desc("Stop optimization before level raise"), + cl::Hidden); + +static cl::opt +Verify("verify", cl::desc("Verify each pass result")); + static inline void addPass(PassManager &PM, Pass *P) { static int NumPassesCreated = 0; diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp index 919884419d4..e5db8849ddc 100644 --- a/tools/gccld/gccld.cpp +++ b/tools/gccld/gccld.cpp @@ -33,13 +33,28 @@ #include using std::cerr; -cl::StringList InputFilenames("", "Load files, linking them together", - cl::OneOrMore); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags,"a.out"); -cl::Flag Verbose ("v", "Print information about actions taken"); -cl::StringList LibPaths ("L", "Specify a library search path", cl::ZeroOrMore); -cl::StringList Libraries ("l", "Specify libraries to link to", cl::ZeroOrMore); -cl::Flag Strip ("s", "Strip symbol info from executable"); +static cl::list +InputFilenames(cl::Positional, cl::desc(""), + cl::OneOrMore); + +static cl::opt +OutputFilename("o", cl::desc("Override output filename"), cl::init("a.out"), + cl::value_desc("filename")); + +static cl::opt +Verbose("v", cl::desc("Print information about actions taken")); + +static cl::list +LibPaths("L", cl::desc("Specify a library search path"), cl::Prefix, + cl::value_desc("directory")); + +static cl::list +Libraries("l", cl::desc("Specify libraries to link to"), cl::Prefix, + cl::value_desc("library prefix")); + +static cl::opt +Strip("s", cl::desc("Strip symbol info from executable")); + // FileExists - Return true if the specified string is an openable file... static inline bool FileExists(const std::string &FN) { @@ -83,10 +98,7 @@ static inline std::auto_ptr LoadFile(const std::string &FN) { int main(int argc, char **argv) { - cl::ParseCommandLineOptions(argc, argv, " llvm linker for GCC\n", - cl::EnableSingleLetterArgValue | - cl::DisableSingleLetterArgGrouping); - assert(InputFilenames.size() > 0 && "OneOrMore is not working"); + cl::ParseCommandLineOptions(argc, argv, " llvm linker for GCC\n"); unsigned BaseArg = 0; std::string ErrorMessage; diff --git a/tools/link/link.cpp b/tools/link/link.cpp index 28499f19881..e2ab02e92d0 100644 --- a/tools/link/link.cpp +++ b/tools/link/link.cpp @@ -22,13 +22,25 @@ using std::cerr; -cl::StringList InputFilenames("", "Load files, linking them together", - cl::OneOrMore); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags, "-"); -cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false); -cl::Flag Verbose ("v", "Print information about actions taken"); -cl::Flag DumpAsm ("d", "Print assembly as linked", cl::Hidden, false); -cl::StringList LibPaths ("L", "Specify a library search path", cl::ZeroOrMore); +static cl::list +InputFilenames(cl::Positional, cl::OneOrMore, + cl::desc("Load files, linking them together")); + +static cl::opt +OutputFilename("o", cl::desc("Override output filename"), cl::init("-"), + cl::value_desc("filename")); + +static cl::opt Force("f", cl::desc("Overwrite output files")); + +static cl::opt +Verbose("v", cl::desc("Print information about actions taken")); + +static cl::opt +DumpAsm("d", cl::desc("Print assembly as linked"), cl::Hidden); + +static cl::list +LibPaths("L", cl::desc("Specify a library search path"), cl::ZeroOrMore, + cl::value_desc("directory"), cl::Prefix); // FileExists - Return true if the specified string is an openable file... static inline bool FileExists(const std::string &FN) { @@ -74,9 +86,7 @@ static inline std::auto_ptr LoadFile(const std::string &FN) { int main(int argc, char **argv) { - cl::ParseCommandLineOptions(argc, argv, " llvm linker\n", - cl::EnableSingleLetterArgValue | - cl::DisableSingleLetterArgGrouping); + cl::ParseCommandLineOptions(argc, argv, " llvm linker\n"); assert(InputFilenames.size() > 0 && "OneOrMore is not working"); unsigned BaseArg = 0; diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 3e1dfbcae11..785f0a624ca 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -24,22 +24,33 @@ using std::string; using std::cerr; -static cl::String InputFilename ("", "Input filename", cl::NoFlags, "-"); -static cl::String OutputFilename("o", "Output filename", cl::NoFlags, ""); -static cl::Flag Force ("f", "Overwrite output files"); -static cl::Flag DumpAsm ("d", "Print bytecode before native code generation", cl::Hidden); -static cl::String TraceLibPath ("tracelibpath", "Path to libinstr for trace code", cl::Hidden, ""); +static cl::opt +InputFilename(cl::Positional, cl::desc(""), cl::init("-")); + +static cl::opt +OutputFilename("o", cl::desc("Output filename"), cl::value_desc("filename")); + +static cl::opt Force("f", cl::desc("Overwrite output files")); + +static cl::opt +DumpAsm("d", cl::desc("Print bytecode before native code generation"), + cl::Hidden); + +static cl::opt +TraceLibPath("tracelibpath", cl::desc("Path to libinstr for trace code"), + cl::value_desc("directory"), cl::Hidden); enum TraceLevel { TraceOff, TraceFunctions, TraceBasicBlocks }; -static cl::Enum TraceValues("trace", cl::NoFlags, - "Trace values through functions or basic blocks", +static cl::opt +TraceValues("trace", cl::desc("Trace values through functions or basic blocks"), + cl::values( clEnumValN(TraceOff , "off", "Disable trace code"), clEnumValN(TraceFunctions , "function", "Trace each function"), - clEnumValN(TraceBasicBlocks, "basicblock", "Trace each basic block"), 0); - + clEnumValN(TraceBasicBlocks, "basicblock", "Trace each basic block"), + 0)); // GetFileNameRoot - Helper function to get the basename of a filename... static inline string GetFileNameRoot(const string &InputFilename) { diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index f4145c169c5..dc351945460 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -10,12 +10,27 @@ #include "Interpreter.h" #include "Support/CommandLine.h" -cl::StringList InputArgv("" , "Input command line", cl::ConsumeAfter); -cl::String MainFunction ("f" , "Function to execute", cl::NoFlags, "main"); -cl::Flag DebugMode ("debug" , "Start program in debugger"); -cl::Alias DebugModeA ("d" , "Alias for -debug", cl::NoFlags, DebugMode); -cl::Flag TraceMode ("trace" , "Enable Tracing"); -cl::Flag ProfileMode ("profile", "Enable Profiling [unimp]"); +static cl::opt +InputFile(cl::desc(""), cl::Positional, cl::init("-")); + +static cl::list +InputArgv(cl::ConsumeAfter, cl::desc("...")); + +static cl::opt +MainFunction ("f", cl::desc("Function to execute"), cl::init("main"), + cl::value_desc("function name")); + +static cl::opt +DebugMode("debug", cl::desc("Start program in debugger")); + +static cl::alias +DebugModeA("d", cl::desc("Alias for -debug"), cl::aliasopt(DebugMode)); + +static cl::opt +TraceMode("trace", cl::desc("Enable Tracing")); + +static cl::opt +ProfileMode("profile", cl::desc("Enable Profiling [unimp]")); //===----------------------------------------------------------------------===// @@ -24,7 +39,7 @@ cl::Flag ProfileMode ("profile", "Enable Profiling [unimp]"); Interpreter::Interpreter() : ExitCode(0), Profile(ProfileMode), Trace(TraceMode), CurFrame(-1) { CurMod = 0; - loadModule(InputArgv.size() ? InputArgv[0] : "-"); + loadModule(InputFile); // Initialize the "backend" initializeExecutionEngine(); @@ -37,6 +52,12 @@ Interpreter::Interpreter() : ExitCode(0), Profile(ProfileMode), int main(int argc, char** argv) { cl::ParseCommandLineOptions(argc, argv, " llvm interpreter\n"); + // Add the module name to the start of the argv vector... + // + InputArgv.insert(InputArgv.begin(), InputFile); + + + // Create the interpreter... Interpreter I; @@ -52,13 +73,6 @@ int main(int argc, char** argv) { if (ProfileMode) I.enableProfiling(); if (TraceMode) I.enableTracing(); - // Ensure that there is at least one argument... the name of the program. - // This is only unavailable if the program was read from stdin, instead of a - // file. - // - if (InputArgv.empty()) - InputArgv.push_back("from-stdin-prog"); - // Start interpreter into the main function... // if (!I.callMainMethod(MainFunction, InputArgv) && !DebugMode) { diff --git a/tools/llvm-as/as.cpp b/tools/llvm-as/as.cpp index a956203e649..c66dd598b9b 100644 --- a/tools/llvm-as/as.cpp +++ b/tools/llvm-as/as.cpp @@ -18,10 +18,18 @@ #include using std::cerr; -cl::String InputFilename ("", "Parse file, compile to bytecode", 0, "-"); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags, ""); -cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false); -cl::Flag DumpAsm ("d", "Print assembly as parsed", cl::Hidden, false); +static cl::opt +InputFilename(cl::Positional, cl::desc(""), cl::init("-")); + +static cl::opt +OutputFilename("o", cl::desc("Override output filename"), + cl::value_desc("filename")); + +static cl::opt +Force("f", cl::desc("Overwrite output files")); + +static cl::opt +DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden); int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n"); diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index a956203e649..c66dd598b9b 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -18,10 +18,18 @@ #include using std::cerr; -cl::String InputFilename ("", "Parse file, compile to bytecode", 0, "-"); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags, ""); -cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false); -cl::Flag DumpAsm ("d", "Print assembly as parsed", cl::Hidden, false); +static cl::opt +InputFilename(cl::Positional, cl::desc(""), cl::init("-")); + +static cl::opt +OutputFilename("o", cl::desc("Override output filename"), + cl::value_desc("filename")); + +static cl::opt +Force("f", cl::desc("Overwrite output files")); + +static cl::opt +DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden); int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n"); diff --git a/tools/llvm-dis/dis.cpp b/tools/llvm-dis/dis.cpp index eb9a3a39ed0..361564c8e54 100644 --- a/tools/llvm-dis/dis.cpp +++ b/tools/llvm-dis/dis.cpp @@ -27,13 +27,22 @@ enum OutputMode { c, // Generate C code }; -cl::String InputFilename ("", "Load file, print as assembly", 0, "-"); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags, ""); -cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false); -cl::EnumFlags WriteMode(cl::NoFlags, - clEnumVal(llvm, "Output LLVM assembly"), - clEnumVal(c , "Output C code for program"), - 0); +static cl::opt +InputFilename(cl::Positional, cl::desc(""), cl::init("-")); + +static cl::opt +OutputFilename("o", cl::desc("Override output filename"), + cl::value_desc("filename")); + +static cl::opt +Force("f", cl::desc("Overwrite output files")); + +static cl::opt +WriteMode(cl::desc("Specify the output format:"), + cl::values( + clEnumVal(llvm, "Output LLVM assembly"), + clEnumVal(c , "Output C code for program"), + 0)); int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " llvm .bc -> .ll disassembler\n"); diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp index eb9a3a39ed0..361564c8e54 100644 --- a/tools/llvm-dis/llvm-dis.cpp +++ b/tools/llvm-dis/llvm-dis.cpp @@ -27,13 +27,22 @@ enum OutputMode { c, // Generate C code }; -cl::String InputFilename ("", "Load file, print as assembly", 0, "-"); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags, ""); -cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false); -cl::EnumFlags WriteMode(cl::NoFlags, - clEnumVal(llvm, "Output LLVM assembly"), - clEnumVal(c , "Output C code for program"), - 0); +static cl::opt +InputFilename(cl::Positional, cl::desc(""), cl::init("-")); + +static cl::opt +OutputFilename("o", cl::desc("Override output filename"), + cl::value_desc("filename")); + +static cl::opt +Force("f", cl::desc("Overwrite output files")); + +static cl::opt +WriteMode(cl::desc("Specify the output format:"), + cl::values( + clEnumVal(llvm, "Output LLVM assembly"), + clEnumVal(c , "Output C code for program"), + 0)); int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " llvm .bc -> .ll disassembler\n"); diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index d1680c09674..4730f54250a 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-extract.cpp @@ -18,8 +18,17 @@ #include "Support/CommandLine.h" #include -static cl::String InputFilename("", "Specify input bytecode file", 0, "-"); -static cl::String ExtractFunc("func", "Specify function to extract", 0, "main"); +// InputFilename - The filename to read from. +static cl::opt +InputFilename(cl::Positional, cl::desc(""), + cl::init("-"), cl::value_desc("filename")); + + +// ExtractFunc - The function to extract from the module... defaults to main. +static cl::opt +ExtractFunc("func", cl::desc("Specify function to extract"), cl::init("main"), + cl::value_desc("function")); + struct FunctionExtractorPass : public Pass { const char *getPassName() const { return "Function Extractor"; } diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index 28499f19881..e2ab02e92d0 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -22,13 +22,25 @@ using std::cerr; -cl::StringList InputFilenames("", "Load files, linking them together", - cl::OneOrMore); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags, "-"); -cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false); -cl::Flag Verbose ("v", "Print information about actions taken"); -cl::Flag DumpAsm ("d", "Print assembly as linked", cl::Hidden, false); -cl::StringList LibPaths ("L", "Specify a library search path", cl::ZeroOrMore); +static cl::list +InputFilenames(cl::Positional, cl::OneOrMore, + cl::desc("Load files, linking them together")); + +static cl::opt +OutputFilename("o", cl::desc("Override output filename"), cl::init("-"), + cl::value_desc("filename")); + +static cl::opt Force("f", cl::desc("Overwrite output files")); + +static cl::opt +Verbose("v", cl::desc("Print information about actions taken")); + +static cl::opt +DumpAsm("d", cl::desc("Print assembly as linked"), cl::Hidden); + +static cl::list +LibPaths("L", cl::desc("Specify a library search path"), cl::ZeroOrMore, + cl::value_desc("directory"), cl::Prefix); // FileExists - Return true if the specified string is an openable file... static inline bool FileExists(const std::string &FN) { @@ -74,9 +86,7 @@ static inline std::auto_ptr LoadFile(const std::string &FN) { int main(int argc, char **argv) { - cl::ParseCommandLineOptions(argc, argv, " llvm linker\n", - cl::EnableSingleLetterArgValue | - cl::DisableSingleLetterArgGrouping); + cl::ParseCommandLineOptions(argc, argv, " llvm linker\n"); assert(InputFilenames.size() > 0 && "OneOrMore is not working"); unsigned BaseArg = 0; diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 609fd2c1e08..54eae4103a0 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -123,13 +123,27 @@ struct { // Command line option handling code... // -cl::String InputFilename ("", "Load file to optimize", cl::NoFlags, "-"); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags, ""); -cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false); -cl::Flag PrintEachXForm("p", "Print module after each transformation"); -cl::Flag Quiet ("q", "Don't print modifying pass names", 0, false); -cl::Alias QuietA ("quiet", "Alias for -q", cl::NoFlags, Quiet); -cl::EnumList OptimizationList(cl::NoFlags, +static cl::opt +InputFilename(cl::Positional, cl::desc(""), cl::init("-")); + +static cl::opt +OutputFilename("o", cl::desc("Override output filename"), + cl::value_desc("filename")); + +static cl::opt +Force("f", cl::desc("Overwrite output files")); + +static cl::opt +PrintEachXForm("p", cl::desc("Print module after each transformation")); + +static cl::opt +Quiet("q", cl::desc("Don't print modifying pass names")); + +static cl::alias +QuietA("quiet", cl::desc("Alias for -q"), cl::aliasopt(Quiet)); + +static cl::list +OptimizationList(cl::desc("Optimizations available:"), cl::values( clEnumVal(dce , "Dead Code Elimination"), clEnumVal(die , "Dead Instruction Elimination"), clEnumVal(constprop , "Simple constant propogation"), @@ -169,7 +183,7 @@ cl::EnumList OptimizationList(cl::NoFlags, clEnumVal(printm , "Print working module to stderr"), clEnumVal(verify , "Verify module is well formed"), clEnumVal(lowerrefs , "Decompose multi-dimensional structure/array refs to use one index per instruction"), -0); +0)); -- 2.34.1