[llvm-commits] [llvm] r167498 - /llvm/trunk/lib/CodeGen/RegAllocFast.cpp

Chad Rosier mcrosier at apple.com
Tue Nov 6 14:52:42 PST 2012


Author: mcrosier
Date: Tue Nov  6 16:52:42 2012
New Revision: 167498

URL: http://llvm.org/viewvc/llvm-project?rev=167498&view=rev
Log:
[regallocfast] Make sure the MachineRegisterInfo is aware of clobbers from a
register masks.  This is an obvious and necessary fix for a soon to be committed
patch.  No test case possible at this time.  Reviewed by Jakob.

Modified:
    llvm/trunk/lib/CodeGen/RegAllocFast.cpp

Modified: llvm/trunk/lib/CodeGen/RegAllocFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocFast.cpp?rev=167498&r1=167497&r2=167498&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocFast.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocFast.cpp Tue Nov  6 16:52:42 2012
@@ -956,6 +956,11 @@
     bool hasPhysDefs = false;
     for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
       MachineOperand &MO = MI->getOperand(i);
+      // Make sure MRI knows about registers clobbered by regmasks.
+      if (MO.isRegMask()) {
+        MRI->addPhysRegsUsedFromRegMask(MO.getRegMask());
+        continue;
+      }
       if (!MO.isReg()) continue;
       unsigned Reg = MO.getReg();
       if (!Reg) continue;





More information about the llvm-commits mailing list