diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-17 23:16:35 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-17 23:16:35 +0000 |
commit | 2e98ee31b3c013dff3cbffa2a2b8a885ec18b2cb (patch) | |
tree | a7a09087207c755c6057b0b01a3ede9ee41331bb /llvm/lib/CodeGen/RegAllocBasic.cpp | |
parent | 1740e00104f99109be0733d7caa044f58d8f8de1 (diff) | |
download | bcm5719-llvm-2e98ee31b3c013dff3cbffa2a2b8a885ec18b2cb.tar.gz bcm5719-llvm-2e98ee31b3c013dff3cbffa2a2b8a885ec18b2cb.zip |
Make the -verify-regalloc command line option available to base classes as
RegAllocBase::VerifyEnabled.
Run the machine code verifier in a few interesting places during RegAllocGreedy.
llvm-svn: 122107
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBasic.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocBasic.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp index f01ebf5030e..85a3d7f1202 100644 --- a/llvm/lib/CodeGen/RegAllocBasic.cpp +++ b/llvm/lib/CodeGen/RegAllocBasic.cpp @@ -53,11 +53,12 @@ static RegisterRegAlloc basicRegAlloc("basic", "basic register allocator", // Temporary verification option until we can put verification inside // MachineVerifier. -static cl::opt<bool> -VerifyRegAlloc("verify-regalloc", - cl::desc("Verify live intervals before renaming")); +static cl::opt<bool, true> +VerifyRegAlloc("verify-regalloc", cl::location(RegAllocBase::VerifyEnabled), + cl::desc("Verify during register allocation")); const char *RegAllocBase::TimerGroupName = "Register Allocation"; +bool RegAllocBase::VerifyEnabled = false; namespace { /// RABasic provides a minimal implementation of the basic register allocation @@ -475,7 +476,7 @@ bool RABasic::runOnMachineFunction(MachineFunction &mf) { // make the rewriter a separate pass and override verifyAnalysis instead. When // that happens, verification naturally falls under VerifyMachineCode. #ifndef NDEBUG - if (VerifyRegAlloc) { + if (VerifyEnabled) { // Verify accuracy of LiveIntervals. The standard machine code verifier // ensures that each LiveIntervals covers all uses of the virtual reg. |