[PATCH] Add zero-overhead looping for xtensa backend
Yangfei (Felix)
felix.yang@huawei.com
Wed Oct 22 02:20:00 GMT 2014
Hi Sterling,
Attached please find the testcase for the spill issue. Try it out with the patch :-)
>
> On Wed, Oct 15, 2014 at 7:10 PM, Yangfei (Felix) <felix.yang@huawei.com>
> wrote:
> > Hi Sterling,
> >
> > Since the patch is delayed for a long time, I'm kind of pushing it. Sorry for
> that.
> > Yeah, you are right. We have some performance issue here as GCC may
> use one more general register in some cases with this patch.
> > Take the following arraysum testcase for example. In doloop optimization,
> GCC figures out that the number of iterations is 1024 and creates a new pseudo
> 79 as the new trip count register.
> > The pseudo 79 is live throughout the loop, this makes the register
> pressure in the loop higher. And it's possible that this new pseudo is spilled by
> reload when the register pressure is very high.
> > I know that the xtensa loop instruction copies the trip count register into
> the LCOUNT special register. And we need describe this hardware feature in GCC
> in order to free the trip count register.
> > But I find it difficult to do. Do you have any good suggestions on this?
>
> There are two issues related to the trip count, one I would like you to solve now,
> one later.
>
> 1. Later: The trip count doesn't need to be updated at all inside these loops, once
> the loop instruction executes. The code below relates to this case.
>
> 2. Now: You should be able to use a loop instruction regardless of whether the
> trip count is spilled. If you have an example where that wouldn't work, I would
> love to see it.
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tripcount-spill.c
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141022/2a6b23e7/attachment.c>
More information about the Gcc-patches
mailing list