[llvm-commits] [llvm] r117597 - /llvm/trunk/lib/CodeGen/InlineSpiller.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu Oct 28 13:34:47 PDT 2010
Author: stoklund
Date: Thu Oct 28 15:34:47 2010
New Revision: 117597
URL: http://llvm.org/viewvc/llvm-project?rev=117597&view=rev
Log:
Add a temporary command line option to verify machine code after each spill or
split.
Modified:
llvm/trunk/lib/CodeGen/InlineSpiller.cpp
Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=117597&r1=117596&r2=117597&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original)
+++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Thu Oct 28 15:34:47 2010
@@ -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 @@
SmallVectorImpl<LiveInterval*> &spillIs) {
LiveRangeEdit edit(*li, newIntervals, spillIs);
spill(edit);
+ if (VerifySpills)
+ mf_.verify(&pass_);
}
void InlineSpiller::spill(LiveRangeEdit &edit) {
More information about the llvm-commits
mailing list