[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

Devang Patel dpatel at apple.com
Mon Jan 15 12:32:09 PST 2007



Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.120 -> 1.121
---
Log message:

Do not record last users of Pass Manager.


---
Diffs of the changes:  (+7 -2)

 PassManager.cpp |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.120 llvm/lib/VMCore/PassManager.cpp:1.121
--- llvm/lib/VMCore/PassManager.cpp:1.120	Fri Jan 12 14:07:16 2007
+++ llvm/lib/VMCore/PassManager.cpp	Mon Jan 15 14:31:54 2007
@@ -594,8 +594,13 @@
       }
     }
 
-    LastUses.push_back(P);
-    TPM->setLastUser(LastUses, P);
+    // Set P as P's last user until someone starts using P.
+    // However, if P is a Pass Manager then it does not need
+    // to record its last user.
+    if (!dynamic_cast<PMDataManager *>(P)) {
+      LastUses.push_back(P);
+      TPM->setLastUser(LastUses, P);
+    }
 
     // Take a note of analysis required and made available by this pass.
     // Remove the analysis not preserved by this pass






More information about the llvm-commits mailing list