diff options
author | Devang Patel <dpatel@apple.com> | 2007-01-15 20:31:54 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-01-15 20:31:54 +0000 |
commit | 3f5ecd7eb5526f75b4c36012b5b5194c69187a56 (patch) | |
tree | e42514dc6f2f4b8d1bbc8d104b18e0e51c06a2a8 /lib/VMCore/PassManager.cpp | |
parent | 1b30754ba9ced4d87bf2b3699ec4908b57f474ed (diff) |
Do not record last users of Pass Manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33243 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/PassManager.cpp')
-rw-r--r-- | lib/VMCore/PassManager.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 376e1b798e..d48c198bbf 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -594,8 +594,13 @@ void PMDataManager::add(Pass *P, } } - 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 |