[PATCH] D16016: [PGO] IR level instrumentation of indirect call value profiling

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 11:36:17 PST 2016


On Mon, Jan 11, 2016 at 9:58 AM, David Li <davidxl at google.com> wrote:
> davidxl added a comment.
>
> Please also add test cases.
>
>
> ================
> Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:347
> @@ +346,3 @@
> +
> +  unsigned NumIndirectCallSites = 0;
> +  for (auto &BB : F) {
> ----------------
> To make sure that instrumentation and lowering assign the callsite index in the same way, some refactoring is needed -- defined a Icall visitor class that can be shared across.

Correction:
I meant 'icall promotion' order  not lowering order.  Since icall
promotion patch is not yet submitted, the real suggestion is to
extract the value site index assignment code into a shared utility so
that when transformation comes in, it can directly use it.

David

> ================
> Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:351
> @@ +350,3 @@
> +      CallSite CS(&Inst);
> +      if (!CS || CS.getCalledFunction()) continue;
> +      Value *Callee = CS.getCalledValue();
> ----------------
> Fix format.
>
>
> http://reviews.llvm.org/D16016
>
>
>


More information about the llvm-commits mailing list