mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
add cmd line option to leave dbgvalues in during post-RA sceduling. Useful
while debugging what's mishandled about them in the post-RA pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103805 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d33fa0f9e0
commit
5468e0928b
@ -80,6 +80,12 @@ DebugMod("postra-sched-debugmod",
|
|||||||
cl::desc("Debug control MBBs that are scheduled"),
|
cl::desc("Debug control MBBs that are scheduled"),
|
||||||
cl::init(0), cl::Hidden);
|
cl::init(0), cl::Hidden);
|
||||||
|
|
||||||
|
static cl::opt<bool>
|
||||||
|
EnablePostRADbgValue("post-RA-dbg-value",
|
||||||
|
cl::desc("Enable processing of dbg_value in post-RA"),
|
||||||
|
cl::init(false), cl::Hidden);
|
||||||
|
|
||||||
|
|
||||||
AntiDepBreaker::~AntiDepBreaker() { }
|
AntiDepBreaker::~AntiDepBreaker() { }
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@ -269,12 +275,15 @@ bool PostRAScheduler::runOnMachineFunction(MachineFunction &Fn) {
|
|||||||
// scheduler has some sort of problem with DebugValue instructions that
|
// scheduler has some sort of problem with DebugValue instructions that
|
||||||
// causes an assertion in LeaksContext.h to fail occasionally. Just
|
// causes an assertion in LeaksContext.h to fail occasionally. Just
|
||||||
// remove all those instructions for now.
|
// remove all those instructions for now.
|
||||||
|
if (!EnablePostRADbgValue) {
|
||||||
|
DEBUG(dbgs() << "*** Maintaining DbgValues in PostRAScheduler\n");
|
||||||
for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
|
for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
|
||||||
I != E; ) {
|
I != E; ) {
|
||||||
MachineInstr *MI = &*I++;
|
MachineInstr *MI = &*I++;
|
||||||
if (MI->isDebugValue())
|
if (MI->isDebugValue())
|
||||||
MI->eraseFromParent();
|
MI->eraseFromParent();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Schedule each sequence of instructions not interrupted by a label
|
// Schedule each sequence of instructions not interrupted by a label
|
||||||
// or anything else that effectively needs to shut down scheduling.
|
// or anything else that effectively needs to shut down scheduling.
|
||||||
|
Loading…
Reference in New Issue
Block a user