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

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 19:53:26 PDT 2015


chandlerc accepted this revision.
chandlerc added a reviewer: chandlerc.
chandlerc marked 3 inline comments as done.
chandlerc added a comment.
This revision is now accepted and ready to land.

Thanks, submitting with the suggested change from Hal based on his feedback.

Feel free to grumble about better names in post-commit review if needed.


================
Comment at: include/llvm/PassAnalysisSupport.h:95
@@ +94,3 @@
+  template<class PassClass>
+  AnalysisUsage &addUsed() {
+    Used.push_back(&PassClass::ID);
----------------
hfinkel wrote:
> 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.
> 
Done and submitting. Thanks!


http://reviews.llvm.org/D12114





More information about the llvm-commits mailing list