forked from OSchip/llvm-project
Add a temporary command line option to verify machine code after each spill or
split. llvm-svn: 117597
This commit is contained in:
parent
47215f4e04
commit
1005cf323d
|
@ -25,11 +25,15 @@
|
||||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/TargetInstrInfo.h"
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
static cl::opt<bool>
|
||||||
|
VerifySpills("verify-spills", cl::desc("Verify after each spill/split"));
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
class InlineSpiller : public Spiller {
|
class InlineSpiller : public Spiller {
|
||||||
MachineFunctionPass &pass_;
|
MachineFunctionPass &pass_;
|
||||||
|
@ -337,6 +341,8 @@ void InlineSpiller::spill(LiveInterval *li,
|
||||||
SmallVectorImpl<LiveInterval*> &spillIs) {
|
SmallVectorImpl<LiveInterval*> &spillIs) {
|
||||||
LiveRangeEdit edit(*li, newIntervals, spillIs);
|
LiveRangeEdit edit(*li, newIntervals, spillIs);
|
||||||
spill(edit);
|
spill(edit);
|
||||||
|
if (VerifySpills)
|
||||||
|
mf_.verify(&pass_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InlineSpiller::spill(LiveRangeEdit &edit) {
|
void InlineSpiller::spill(LiveRangeEdit &edit) {
|
||||||
|
|
Loading…
Reference in New Issue