summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2018-06-21 13:38:43 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2018-06-21 13:38:43 +0000
commit6a3229301f7fb38d57554438d0186bfab0a737c1 (patch)
tree40d3f46507bd60ffec1d17e667153039a44e2287 /llvm/lib/CodeGen
parent15745ba5c119f8f53363205ccd6f38c5171e0d5c (diff)
downloadbcm5719-llvm-6a3229301f7fb38d57554438d0186bfab0a737c1.tar.gz
bcm5719-llvm-6a3229301f7fb38d57554438d0186bfab0a737c1.zip
[CodeGen] Avoid handling DBG_VALUE in LiveRegUnits::stepBackward
Patch by Jesper Antonsson. Differential Revision: https://reviews.llvm.org/D48420 llvm-svn: 335233
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveRegUnits.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveRegUnits.cpp b/llvm/lib/CodeGen/LiveRegUnits.cpp
index 9f28db6287b..c2268138549 100644
--- a/llvm/lib/CodeGen/LiveRegUnits.cpp
+++ b/llvm/lib/CodeGen/LiveRegUnits.cpp
@@ -46,7 +46,7 @@ void LiveRegUnits::stepBackward(const MachineInstr &MI) {
// Remove defined registers and regmask kills from the set.
for (ConstMIBundleOperands O(MI); O.isValid(); ++O) {
if (O->isReg()) {
- if (!O->isDef())
+ if (!O->isDef() || O->isDebug())
continue;
unsigned Reg = O->getReg();
if (!TargetRegisterInfo::isPhysicalRegister(Reg))
@@ -58,7 +58,7 @@ void LiveRegUnits::stepBackward(const MachineInstr &MI) {
// Add uses to the set.
for (ConstMIBundleOperands O(MI); O.isValid(); ++O) {
- if (!O->isReg() || !O->readsReg())
+ if (!O->isReg() || !O->readsReg() || O->isDebug())
continue;
unsigned Reg = O->getReg();
if (!TargetRegisterInfo::isPhysicalRegister(Reg))
OpenPOWER on IntegriCloud