[PATCH] D81981: [PGO] Supplement PGO profile with Sample profile

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 16:44:20 PDT 2020


wmi added a comment.

In D81981#2099452 <https://reviews.llvm.org/D81981#2099452>, @davidxl wrote:

> Why is the profile size increase? I expect the number of instrumented blocks remain mostly unchanged.
>
> The reason for the question is that if the overhead is low, I think we should make the default to be true.


For function entry bb which have multiple successors, the existing algorithm in FuncPGOInstrumentation<Edge, BBInfo>::getInstrBB will insert the counter in all its successors. My current implementation simply adds a counter in entry block so in that case, it introduces redundent counter.

I can improve it by selecting a successor to not insert counter for it since it can be inferred from the counters surrounding it. With that implemented, I expect the profile size will be unchanged.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D81981





More information about the llvm-commits mailing list