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


> On Tue, Oct 21, 2014 at 7:20 PM, Yangfei (Felix) <felix.yang@huawei.com> wrote:
> > If the tripcount spill issue is not handled in the pattern, ICE may happen then.
> > Here reload is trying to spill pseudo 173, but a memory operand is not allowed
> in zero_cost_loop_end pattern.
> > And this is what I am trying to solve.
> 
> We have full control of the zero_cost_loop_end pattern. Plus, it doesn't actually
> generate any real code. Edit it so it can take a memory operand.

Here the key point is we need a general purpose register for the "loop" instruction. 
If the trip count register is spilled, we don't have a general purpose register then. And we cannot use zero-cost looping in this situation.
And that's why I spilt the zero_cost_loop_end into a normal test and branch. 

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