summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/InlineSpiller.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-28 20:34:47 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-28 20:34:47 +0000
commit1005cf323d6a8da48cac528de3a4d406df1b51a7 (patch)
treee20f0619d10a24dc782b904a511a83f4d1e59dcb /llvm/lib/CodeGen/InlineSpiller.cpp
parent47215f4e04d333aa63668e077df9301144aa1a2f (diff)
downloadbcm5719-llvm-1005cf323d6a8da48cac528de3a4d406df1b51a7.tar.gz
bcm5719-llvm-1005cf323d6a8da48cac528de3a4d406df1b51a7.zip
Add a temporary command line option to verify machine code after each spill or
split. llvm-svn: 117597
Diffstat (limited to 'llvm/lib/CodeGen/InlineSpiller.cpp')
-rw-r--r--llvm/lib/CodeGen/InlineSpiller.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp
index e938135a4ec..73980f38b99 100644
--- a/llvm/lib/CodeGen/InlineSpiller.cpp
+++ b/llvm/lib/CodeGen/InlineSpiller.cpp
@@ -25,11 +25,15 @@
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetInstrInfo.h"
+#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
+static cl::opt<bool>
+VerifySpills("verify-spills", cl::desc("Verify after each spill/split"));
+
namespace {
class InlineSpiller : public Spiller {
MachineFunctionPass &pass_;
@@ -337,6 +341,8 @@ void InlineSpiller::spill(LiveInterval *li,
SmallVectorImpl<LiveInterval*> &spillIs) {
LiveRangeEdit edit(*li, newIntervals, spillIs);
spill(edit);
+ if (VerifySpills)
+ mf_.verify(&pass_);
}
void InlineSpiller::spill(LiveRangeEdit &edit) {
OpenPOWER on IntegriCloud