[PATCH] D18679: Port demanded-bits to the new pass manager

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 00:21:02 PDT 2016


chandlerc requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: include/llvm/Analysis/DemandedBits.h:39
@@ -37,4 +38,3 @@
 
-struct DemandedBits : public FunctionPass {
-  static char ID; // Pass identification, replacement for typeid
-  DemandedBits();
+class DemandedBitsResult {
+public:
----------------
I would just call this "DemandedBits". In many cases, the original name was already a useful noun describing the results and query API and not really anything to do with the analysis.

================
Comment at: include/llvm/Analysis/DemandedBits.h:71
@@ -69,1 +70,3 @@
 
+class DemandedBitsLegacyPass : public FunctionPass {
+private:
----------------
I've been calling these "...WrapperPass" to signify that they actually contain the result object for the legacy PM.

DomTree and LoopInfo I think are reasonable examples here.

================
Comment at: include/llvm/Analysis/DemandedBits.h:73
@@ +72,3 @@
+private:
+  mutable Optional<DemandedBitsResult> DB;
+public:
----------------
Why mutable?


http://reviews.llvm.org/D18679





More information about the llvm-commits mailing list