mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 01:38:26 +00:00
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
This commit is contained in:
parent
24a492683c
commit
26b92be922
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user