diff options
author | Chris Lattner <sabre@nondot.org> | 2001-09-19 16:26:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-09-19 16:26:23 +0000 |
commit | 045e7c8434cc9b61413c0b4df3b8568e79fe28bf (patch) | |
tree | e9bb0aa9fee2680aa808b1686673c9ae945e5d9e | |
parent | 6edcad89e7d5ff58dc347206e8d0c5c7a6459505 (diff) | |
download | external_llvm-045e7c8434cc9b61413c0b4df3b8568e79fe28bf.zip external_llvm-045e7c8434cc9b61413c0b4df3b8568e79fe28bf.tar.gz external_llvm-045e7c8434cc9b61413c0b4df3b8568e79fe28bf.tar.bz2 |
Change debug info from #define to command line option
Clean up extra debug info that wasn't guarded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@647 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/RegAlloc/PhyRegAlloc.cpp | 17 | ||||
-rw-r--r-- | lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp | 17 |
2 files changed, 24 insertions, 10 deletions
diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp index 8824b64..1cb1809 100644 --- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp +++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp @@ -1,6 +1,10 @@ #include "llvm/CodeGen/PhyRegAlloc.h" - +cl::Enum<RegAllocDebugLevel_t> DEBUG_RA("dregalloc", cl::NoFlags, + "enable register allocation debugging information", + 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); //---------------------------------------------------------------------------- @@ -267,8 +271,9 @@ void PhyRegAlloc::updateMachineCode() const Value *const Val = Op.getVRegValue(); // delete this condition checking later (must assert if Val is null) - if( !Val && DEBUG_RA) { - cout << "Warning: NULL Value found for operand" << endl; + if( !Val) { + if (DEBUG_RA) + cout << "Warning: NULL Value found for operand" << endl; continue; } assert( Val && "Value is NULL"); @@ -480,8 +485,10 @@ void PhyRegAlloc::allocateRegisters() RegClassList[ rc ]->colorAllRegs(); updateMachineCode(); - PrintMachineInstructions(Meth); - printMachineCode(); // only for DEBUGGING + if (DEBUG_RA) { + PrintMachineInstructions(Meth); + printMachineCode(); // only for DEBUGGING + } } diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp index 8824b64..1cb1809 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp @@ -1,6 +1,10 @@ #include "llvm/CodeGen/PhyRegAlloc.h" - +cl::Enum<RegAllocDebugLevel_t> DEBUG_RA("dregalloc", cl::NoFlags, + "enable register allocation debugging information", + 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); //---------------------------------------------------------------------------- @@ -267,8 +271,9 @@ void PhyRegAlloc::updateMachineCode() const Value *const Val = Op.getVRegValue(); // delete this condition checking later (must assert if Val is null) - if( !Val && DEBUG_RA) { - cout << "Warning: NULL Value found for operand" << endl; + if( !Val) { + if (DEBUG_RA) + cout << "Warning: NULL Value found for operand" << endl; continue; } assert( Val && "Value is NULL"); @@ -480,8 +485,10 @@ void PhyRegAlloc::allocateRegisters() RegClassList[ rc ]->colorAllRegs(); updateMachineCode(); - PrintMachineInstructions(Meth); - printMachineCode(); // only for DEBUGGING + if (DEBUG_RA) { + PrintMachineInstructions(Meth); + printMachineCode(); // only for DEBUGGING + } } |