[PATCH] D14875: LiveVariables should not clobber MachineOperand::IsDead, ::IsKill on reserved physical registers

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 24 12:09:44 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL254012: LiveVariables should not clobber MachineOperand::IsDead, ::IsKill on reserved… (authored by matze).

Changed prior to commit:
  http://reviews.llvm.org/D14875?vs=41039&id=41071#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14875

Files:
  llvm/trunk/lib/CodeGen/LiveVariables.cpp

Index: llvm/trunk/lib/CodeGen/LiveVariables.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/LiveVariables.cpp
+++ llvm/trunk/lib/CodeGen/LiveVariables.cpp
@@ -522,11 +522,15 @@
       continue;
     unsigned MOReg = MO.getReg();
     if (MO.isUse()) {
-      MO.setIsKill(false);
+      if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) &&
+            MRI->isReserved(MOReg)))
+        MO.setIsKill(false);
       if (MO.readsReg())
         UseRegs.push_back(MOReg);
     } else /*MO.isDef()*/ {
-      MO.setIsDead(false);
+      if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) &&
+            MRI->isReserved(MOReg)))
+        MO.setIsDead(false);
       DefRegs.push_back(MOReg);
     }
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14875.41071.patch
Type: text/x-patch
Size: 754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151124/1276ba4d/attachment.bin>


More information about the llvm-commits mailing list