[PATCH] D21468: Fixed LegacyPassManager inconsistency
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 17 15:14:26 PDT 2016
mehdi_amini added inline comments.
================
Comment at: include/llvm/IR/LegacyPassManagers.h:194
@@ -189,1 +193,3 @@
+ bool isLastUseUnlocked(const Pass *P);
+
/// Collect passes whose last user is P
----------------
Could these be better documented here?
================
Comment at: include/llvm/IR/LegacyPassManagers.h:250
@@ +249,3 @@
+ // last use locked when the pass is no longer preserved.
+ SmallVector<const Pass *, 16> LockedLastUse;
+
----------------
Why a small vector? Also the comment says it is a "Map" apparently, while it is used as a set.
We have SmallPtrSet for instance.
================
Comment at: lib/IR/LegacyPassManager.cpp:877
@@ -876,3 @@
- if (AnUsage->getPreservesAll())
- return;
-
----------------
Why removing the early return?
================
Comment at: test/Feature/legacypassmanager.ll:19
@@ +18,2 @@
+}
+
----------------
Do we have a better way of testing PM?
Do we have C++ unit tests?
http://reviews.llvm.org/D21468
More information about the llvm-commits
mailing list