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

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 15:43:57 PST 2016


You can always find the first counter incr instruction in the first
loop. Then do the creation outside the first loop.

David

On Fri, Jan 8, 2016 at 3:32 PM, Rong Xu <xur at google.com> wrote:
> 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