This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: condition codes, haifa-sched and virtual-stack-vars
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Ulrich Weigand <weigand at immd1 dot informatik dot uni-erlangen dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: 30 Jan 2002 14:14:03 -0800
- Subject: Re: condition codes, haifa-sched and virtual-stack-vars
- References: <200201302141.WAA17069@faui1a.informatik.uni-erlangen.de>
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>