[PATCH] D16015: [PGO] Create the profile data variable before the lowering

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 15:32:53 PST 2016


On Fri, Jan 8, 2016 at 3:29 PM, David Li <davidxl at google.com> wrote:
> davidxl added inline comments.
>
> ================
> Comment at: lib/Transforms/Instrumentation/InstrProfiling.cpp:155
> @@ +154,3 @@
> +    bool CounterVarSet = false;
> +    for (BasicBlock &BB : F) {
> +      if (CounterVarSet) break;
> ----------------
> Why not fuse this loop with the above one?

It needs to know the number of indirect call sites in this function
which is set in  computeNumValueSiteCounts(Ind);
i.e fusing the two loops violate the dependence.

>
>
> http://reviews.llvm.org/D16015
>
>
>


More information about the llvm-commits mailing list