Call release() directly when cleaning up the remaining DomainValues.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 8 Nov 2011 22:05:17 +0000 (22:05 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 8 Nov 2011 22:05:17 +0000 (22:05 +0000)
There is no need to involve the LiveRegs array and kill() any longer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144133 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/ExecutionDepsFix.cpp

index 994a5c36e7c3747e5772d9999e1474d8904fa157..5a75fde2d6d7a49fbbea414b39402d5c3d3eee39 100644 (file)
@@ -525,12 +525,10 @@ bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) {
     if (FI == LiveOuts.end())
       continue;
     assert(FI->second && "Null entry");
-    // The DomainValue is collapsed when the last reference is killed.
-    LiveRegs = FI->second;
     for (unsigned i = 0, e = NumRegs; i != e; ++i)
-      if (LiveRegs[i])
-        kill(i);
-    delete[] LiveRegs;
+      if (FI->second[i])
+        release(FI->second[i]);
+    delete[] FI->second;
   }
   LiveOuts.clear();
   Avail.clear();