[PATCH] D18069: Throttling LICM to reduce compile time of Value Propagation and Reg Splitting

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 17:48:50 PST 2016


Note: Stretched vars are not only affecting performance of Value
Propagation, but also register allocation (Reg Splitting). As Daniel
said, for the compile time problem in Value Propagation, it could be
solved in an eager way.  But it still hurts the compile time of reg
alloca for which I don't have an easy solution.

Actually I am not convinced that doing LICM as many as possible is
indispensible to canonicalize IR. As far as I know, Gcc throttle LICM
too, in middle end. I cannot think of any optimization depends on it
to do a better job. If it exists, it will be interesting to know what
is going on there.

And I don't think doing opt aggressively without known benefit and
then nullify it is a good idea. For now, llvm depends on register
splitting and rematerialization to alleviate the reg pressure pain
caused by aggressive LICM. But register allocation does it far from
perfectly...  Although, my major purpose of the patch is not to solve
the reg pressure brought by LICM.

Wei.



On Fri, Mar 11, 2016 at 5:20 PM, Philip Reames
<listmail at philipreames.com> wrote:
> David,
>
> I very deeply believe that limiting hoisting in the IR to reduce register
> pressure is fundamentally the wrong approach.  The backend is responsible
> for sinking if desired to reduce register pressure. We do not model register
> pressure in the IR.  At all.  Period.
>
> Philip
>
>
> On 03/11/2016 05:08 PM, David Li wrote:
>>
>> davidxl added a comment.
>>
>> I have not read the patch in details, but it seems the main purpose of the
>> patch to throttle LICM to reduce register pressure and the compile time
>> benefit due to reduced LVI queries is just a good side effect of the patch?
>> Do we have any performance data (runtime) showing the usefulness of the
>> throttling?  (Whether this is the right approach to solve the spill problem
>> is also subject to discussions).
>>
>>
>> Repository:
>>    rL LLVM
>>
>> http://reviews.llvm.org/D18069
>>
>>
>>
>


More information about the llvm-commits mailing list