aboutsummaryrefslogtreecommitdiffstats
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
commit26b92be9222e267447efe943f12848775075e22f (patch)
tree76e81cb794d946fdb3f485c43e99f3dfc988f1f3
parent24a492683ca02f234d727740f03c1fb2949f2b44 (diff)
downloadexternal_llvm-26b92be9222e267447efe943f12848775075e22f.zip
external_llvm-26b92be9222e267447efe943f12848775075e22f.tar.gz
external_llvm-26b92be9222e267447efe943f12848775075e22f.tar.bz2
Add a temporary command line option to verify machine code after each spill or
split. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117597 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/InlineSpiller.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/InlineSpiller.cpp b/lib/CodeGen/InlineSpiller.cpp
index e938135..73980f3 100644
--- a/lib/CodeGen/InlineSpiller.cpp
+++ b/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) {