[prev in list] [next in list] [prev in thread] [next in thread]
List: llvm-dev
Subject: Re: [LLVMdev] Poor register allocation (constants causing spilling)
From: Robert Lougher <rob.lougher () gmail ! com>
Date: 2015-07-31 19:03:48
Message-ID: CABx0ACDzQ6pBW6-=+AvwNgj0JYHXKdS9sOK8oT5u41DDK0szWg () mail ! gmail ! com
[Download RAW message or body]
Hi Quentin,
On 16 July 2015 at 00:22, Robert Lougher <rob.lougher@gmail.com> wrote:
> Hi Quentin,
>
> Sorry for the delay, I've been bogged down with other things today.
>
> On 14 July 2015 at 18:48, Quentin Colombet <qcolombet@apple.com> wrote:
> > >
> > > * A rematerializable interval once split is no longer rematerializable *
> > >
> > > The isRematerializable check in CalcSpillWeights.cpp uses the target
> > > instruction info to check that the machine instruction for the live
> > > interval definition is trivially rematerializable. In the case of
> > > interval A above, the definition is a load from the constant-pool.
> > > This is trivially rematerializable and the spill weight is halved.
> > > However, in the remainder intervals B, C and D the definition is a
> > > copy. This is not trivially rematerializable, and the spill weight is
> > > unadjusted. This means these ranges are considered as expensive as
> > > non-rematerializable ranges.
> >
> > This is the first think to fix. As long as a live-range is rematerializable, we \
> > should reflect that properly in the spill weight. Could you clean up your patch \
> > to fix that?
>
> Unfortunately my change was an ugly hack that was good enough for my
> experiment but not the right approach for a proper fix (it added an
> is_remat bool to the interval class, and adjusted the weights and
> propagated the flag after local splitting - as they're in the same
> basic block they should remain rematerializable). I'm now looking at
> a proper fix, although it may take some time...
>
I've posted a cleaned-up version of the patch for review:
http://reviews.llvm.org/D11686
Please let me know what you think.
Thanks,
Rob.
_______________________________________________
LLVM Developers mailing list
LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic