This is the mail archive of the gcc@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: condition codes, haifa-sched and virtual-stack-vars


Ulrich Weigand <weigand@immd1.informatik.uni-erlangen.de> writes:

> Greg McGary wrote:
> 
> >Here's a summary of mutations, by optimizer phase.
> 
> [snip reload generating addsi insn clobbering CC]
> 
> >Things would have been OK if the stack var weren't the first one,
> >so that it got an offset in 00.rtl, and the associated clobber.
> >Maybe we shouldn't emit bare virtual-stack-vars, but rather emit as
> >plus with 0 offset?
> 
> I've been fighting exactly this problem on s390 ever since
> we changed from cc0 to an explicit CC register :-(
> 
> The problem is that reload simply calls gen_add2_insn whenever it
> feels like it, without consideration that this might introduce
> a CC clobber at an inappropriate point ...

On xstormy16, this problem existed with the carry register.  I believe
it was fixed by having a reload_inhi pattern and an appropriate
definition of SECONDARY_RELOAD_CLASS.  The result appears to work.

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>


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