[PATCH] D93556: [CSSPGO][llvm-profgen] Compress recursive cycles in calling context

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 09:29:41 PST 2021


wlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.h:63
+    compressRecursionContext<T>(
+        Context, CompressionSize == -1 ? Context.size() : CompressionSize);
+  }
----------------
hoy wrote:
> wlei wrote:
> > hoy wrote:
> > > Moving the implementation to ProfileGenerator.cpp so that `RecursionCompression` can be checked instead of using an extra global?
> > Yes, I tried this but failed because of the unit test which need to link the cpp file and the dependence need to include many other files. Not sure other ways to link the a Tool dir to the unit test, so I chose to put it into header file. what do you think?
> I see. Can `CompressionSize` be made a static field of the class and initialized in the cpp file?
> 
> Also, it sounds to me `compressRecursionContext` should be a function of `CSProfileGenerator` since it is CS-specific. What do you think?
Yes, good suggestions, thanks. made `CompressionSize` static and moved `compressRecursionContext` into `CSProfileGenerator `


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93556/new/

https://reviews.llvm.org/D93556



More information about the llvm-commits mailing list