[PATCH] Fix PR 23525 - Separate header mass propagation in irregular loops.

Xinliang David Li xinliangli at gmail.com
Wed Jun 10 09:27:19 PDT 2015


On Wed, Jun 10, 2015 at 8:44 AM, Diego Novillo <dnovillo at google.com> wrote:

>
>
> On Wed, Jun 10, 2015 at 2:47 AM, David <davidxl at google.com> wrote:
>
>> ================
>> Comment at: include/llvm/Analysis/BlockFrequencyInfoImpl.h:1057
>> @@ -1045,1 +1056,3 @@
>> +
>> +    adjustLoopHeaderMass(Loop);
>>    } else {
>> ----------------
>> Should this be done iteratively? The mass propagation before this call is
>> based on wrong initial masses for loop headers.
>>
>
> Yeah, iterating a fixed number of times here would give us a better
> approximation. I was thinking of tuning this after the initial fix.
>

Ok.  Ideally, to also address Duncan's concern about not considering
incoming edge when computing header nodes mass distribution (which can skew
the results for short trip counted irreducible loops), the iterative
algorithm should be done in the context of the parent loop of the
irreducible loop. If a loop contains a irreducible child loop, its mass
computation needs to be iterative: the subloop needs to be unpackaged and
the mass computation results of the parent loop from previous iteration can
be used to initialize the masses of the subloop's header nodes .. Not sure
if it is important to handle this in reality -- we can deal with later when
needed.

David



>
> Diego.
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150610/9e42a8ee/attachment.html>


More information about the llvm-commits mailing list