From 960066ad75e1dce3b908c6b211b3d69974380246 Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Tue, 31 Jul 2001 21:53:25 +0000 Subject: [PATCH] Simplify command line options, and add option for printing machine instructions without debugging info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/InstrSelection/InstrSelection.cpp | 14 ++++++++------ .../SparcV9/InstrSelection/InstrSelection.cpp | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/CodeGen/InstrSelection/InstrSelection.cpp b/lib/CodeGen/InstrSelection/InstrSelection.cpp index 4b389b732ce..b879840ba16 100644 --- a/lib/CodeGen/InstrSelection/InstrSelection.cpp +++ b/lib/CodeGen/InstrSelection/InstrSelection.cpp @@ -7,7 +7,7 @@ // // History: // 7/02/01 - Vikram Adve - Created -//*************************************************************************** +//**************************************************************************/ #include "llvm/CodeGen/InstrSelection.h" @@ -21,16 +21,18 @@ enum DebugLev { NoDebugInfo, + PrintInstTrees, DebugInstTrees, DebugBurgTrees, }; // Enable Debug Options to be specified on the command line -cl::Enum DebugLevel("debug_select", cl::NoFlags, // cl::Hidden +cl::Enum DebugLevel("dselect", cl::NoFlags, // cl::Hidden "enable instruction selection debugging information", - clEnumVal(NoDebugInfo , "disable debug output"), - clEnumVal(DebugInstTrees, "print instruction trees"), - clEnumVal(DebugBurgTrees, "print burg trees"), 0); + clEnumValN(NoDebugInfo, "n", "disable debug output"), + clEnumValN(PrintInstTrees, "y", "print generated instruction trees"), + clEnumValN(DebugInstTrees, "i", "print instr. selection debugging info"), + clEnumValN(DebugBurgTrees, "b", "print burg trees"), 0); //************************* Forward Declarations ***************************/ @@ -92,7 +94,7 @@ bool SelectInstructionsForMethod(Method* method, TargetMachine &Target) { instrForest.dump(); } - if (DebugLevel > NoDebugInfo) + if (DebugLevel >= PrintInstTrees) PrintMachineInstructions(method); } diff --git a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp index 4b389b732ce..b879840ba16 100644 --- a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp +++ b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp @@ -7,7 +7,7 @@ // // History: // 7/02/01 - Vikram Adve - Created -//*************************************************************************** +//**************************************************************************/ #include "llvm/CodeGen/InstrSelection.h" @@ -21,16 +21,18 @@ enum DebugLev { NoDebugInfo, + PrintInstTrees, DebugInstTrees, DebugBurgTrees, }; // Enable Debug Options to be specified on the command line -cl::Enum DebugLevel("debug_select", cl::NoFlags, // cl::Hidden +cl::Enum DebugLevel("dselect", cl::NoFlags, // cl::Hidden "enable instruction selection debugging information", - clEnumVal(NoDebugInfo , "disable debug output"), - clEnumVal(DebugInstTrees, "print instruction trees"), - clEnumVal(DebugBurgTrees, "print burg trees"), 0); + clEnumValN(NoDebugInfo, "n", "disable debug output"), + clEnumValN(PrintInstTrees, "y", "print generated instruction trees"), + clEnumValN(DebugInstTrees, "i", "print instr. selection debugging info"), + clEnumValN(DebugBurgTrees, "b", "print burg trees"), 0); //************************* Forward Declarations ***************************/ @@ -92,7 +94,7 @@ bool SelectInstructionsForMethod(Method* method, TargetMachine &Target) { instrForest.dump(); } - if (DebugLevel > NoDebugInfo) + if (DebugLevel >= PrintInstTrees) PrintMachineInstructions(method); } -- 2.34.1