[PATCH] D12114: [LPM] Teach the legacy pass manager to support *using* an analysis without *requiring* it.

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 14:53:19 PDT 2015


hfinkel added inline comments.

================
Comment at: include/llvm/PassAnalysisSupport.h:95
@@ +94,3 @@
+  template<class PassClass>
+  AnalysisUsage &addUsed() {
+    Used.push_back(&PassClass::ID);
----------------
chandlerc wrote:
> hfinkel wrote:
> > Should we call this addUsedIfAvailable, or similar, to make it clearer what this does (and, specifically, how it differs from addRequired)?
> > 
> Seems a small gain, but if you like. I don't really care. You (or others) give me a spelling.
Eh; many things changed during code review have small gains ;)

I think that addUsedIfAvailable goes well with getAnalysisIfAvailable. If anyone else has a preference, please speak up.



http://reviews.llvm.org/D12114





More information about the llvm-commits mailing list