[PATCH] D32563: Improve code placement algorithm in Reassociate pass.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 17:05:24 PDT 2017


>
>
>> IE it is guaranteed to try to shrink a live range locally, and either
>> succeed or do nothing.
>> That may or may not shrink a live range globally, and may increase the
>> live range locally.
>>
>>
>> IE
>>        A
>>         |
>> A     |
>> |       |
>> |       |
>> A      A
>>
>> A
>> |
>> |
>> A
>>
>> ->
>>
>> A
>> |
>> |
>> A   A
>>       |
>>       |
>> A   A
>> |
>> |
>> A
>>
>>
>> This has shrunk the live range of A locally, but made it worse globally.
>>
>>
>

>
> But at any program point, the max register pressure of the before case is
> 2, the after case is 1?
>

Sorry, i meant to show that the new A range overlapped with both the ones
on the left (IE before it was 2, now it's 3)

In any case, as i said, if you restrict it to the single use case the above
should be impossible.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170427/b46fd059/attachment.html>


More information about the llvm-commits mailing list