diff options
author | Shiva Chen <shiva0217@gmail.com> | 2018-05-09 02:42:00 +0000 |
---|---|---|
committer | Shiva Chen <shiva0217@gmail.com> | 2018-05-09 02:42:00 +0000 |
commit | 801bf7ebbed34577e730a53d6575035c26e39ac1 (patch) | |
tree | 841dab1f5e44ee7126122575dc501d8cf127136f /llvm/lib/CodeGen/RegisterScavenging.cpp | |
parent | 667fbe2cb012f7b231b07379a2c9fc2358c393f0 (diff) | |
download | bcm5719-llvm-801bf7ebbed34577e730a53d6575035c26e39ac1.tar.gz bcm5719-llvm-801bf7ebbed34577e730a53d6575035c26e39ac1.zip |
[DebugInfo] Examine all uses of isDebugValue() for debug instructions.
Because we create a new kind of debug instruction, DBG_LABEL, we need to
check all passes which use isDebugValue() to check MachineInstr is debug
instruction or not. When expelling debug instructions, we should expel
both DBG_VALUE and DBG_LABEL. So, I create a new function,
isDebugInstr(), in MachineInstr to check whether the MachineInstr is
debug instruction or not.
This patch has no new test case. I have run regression test and there is
no difference in regression test.
Differential Revision: https://reviews.llvm.org/D45342
Patch by Hsiangkai Wang.
llvm-svn: 331844
Diffstat (limited to 'llvm/lib/CodeGen/RegisterScavenging.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegisterScavenging.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegisterScavenging.cpp b/llvm/lib/CodeGen/RegisterScavenging.cpp index 97967124add..9fa14c9dc5e 100644 --- a/llvm/lib/CodeGen/RegisterScavenging.cpp +++ b/llvm/lib/CodeGen/RegisterScavenging.cpp @@ -111,7 +111,7 @@ void RegScavenger::determineKillsAndDefs() { assert(Tracking && "Must be tracking to determine kills and defs"); MachineInstr &MI = *MBBI; - assert(!MI.isDebugValue() && "Debug values have no kills or defs"); + assert(!MI.isDebugInstr() && "Debug values have no kills or defs"); // Find out which registers are early clobbered, killed, defined, and marked // def-dead in this instruction. @@ -158,7 +158,7 @@ void RegScavenger::unprocess() { assert(Tracking && "Cannot unprocess because we're not tracking"); MachineInstr &MI = *MBBI; - if (!MI.isDebugValue()) { + if (!MI.isDebugInstr()) { determineKillsAndDefs(); // Commit the changes. @@ -195,7 +195,7 @@ void RegScavenger::forward() { I->Restore = nullptr; } - if (MI.isDebugValue()) + if (MI.isDebugInstr()) return; determineKillsAndDefs(); @@ -318,7 +318,7 @@ unsigned RegScavenger::findSurvivorReg(MachineBasicBlock::iterator StartMI, bool inVirtLiveRange = false; for (++MI; InstrLimit > 0 && MI != ME; ++MI, --InstrLimit) { - if (MI->isDebugValue()) { + if (MI->isDebugInstr()) { ++InstrLimit; // Don't count debug instructions continue; } |