This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add zero-overhead looping for xtensa backend


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.
> 

Attachment: tripcount-spill.c
Description: tripcount-spill.c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]