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 | da876eff3c63beebaf7cb75bd336988d4bb45c17 (patch) | |
| tree | 2b3583ac34cefb0520944c2e9cd49583370e9026 /llvm/lib | |
| parent | d89425bb586acb4fe9990d722a61d96d2e7ccdb1 (diff) | |
| download | bcm5719-llvm-da876eff3c63beebaf7cb75bd336988d4bb45c17.tar.gz bcm5719-llvm-da876eff3c63beebaf7cb75bd336988d4bb45c17.zip | |
Change debug info from #define to command line option
Clean up extra debug info that wasn't guarded
llvm-svn: 647
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp index 8824b64661c..1cb1809c6bd 100644 --- a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp +++ b/llvm/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 + } } |

