[PATCH] D22141: [BFI] Add new LazyBFI analysis pass

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 15:56:29 PDT 2016


anemet added inline comments.

================
Comment at: include/llvm/Analysis/LazyBlockFrequencyInfo.h:22
@@ +21,3 @@
+//
+// 2. Similarly, getAnalysisUsage should call:
+//
----------------
davidxl wrote:
> What is the use model for the new pass manager? Anything worth documenting?
I am not sure we will need this class with the new PM.  Correct me if I am wrong but I thought as long as the client does not call something like getResult<BlockFrequencyAnalysis>(F), the analysis won't be populated.  This is not the case for the old PM.

I was going to play with this after this patch and post follow-on patches if anything is required for the new PM.

Since the vectorizer is converted now, I should be able to try it there.

================
Comment at: include/llvm/Analysis/LazyBlockFrequencyInfo.h:91
@@ +90,3 @@
+/// the file comment for the rules of how to use this properly.
+class LazyBlockFrequencyInfoPass : public FunctionPass {
+  LazyBlockFrequencyInfo LBFI;
----------------
davidxl wrote:
> Can the wrapper class of BFI be 'inlined' into this class so that we don't need LBFI ?
It could certainly live nested in the pass, I would rather not remove it though; it nicely captures the single functionality it provides and the abstraction overhead should be removed by the compiler.


http://reviews.llvm.org/D22141





More information about the llvm-commits mailing list