This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/15265] delete_output_reload deletes necessary insn
- From: "joern dot rennecke at superh dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2004 20:26:23 -0000
- Subject: [Bug optimization/15265] delete_output_reload deletes necessary insn
- References: <20040503152115.15265.matz@suse.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From joern dot rennecke at superh dot com 2004-05-05 20:26 -------
Subject: Re: New: delete_output_reload deletes necessary insn
> There is code in delete_output_reload which I think should prevent this from
> happening (the counting of n_inherited compared to n_occurences) but it
> doesn't work here.
>
> There are two occurences of 'xmm0' in non-destinations. But the way
> n_inherited is counted leads also to 2 because the input and output part
> of the reload in question are counted separately. I think this is non-sense.
> Just because the same reload has in- _and_ out-part (and both are equal) does
> not make it two occurences.
On the face of it, your argument makes sense. However, there are some
subtle issues with SUBREGs/SIGN_EXTENDs/ZERO_EXTENDs, auto-increment, and
address reloads where an operand can be visible multiple times.
Moreover, I think count_occurences should discount top-level occurences in
clobbers the same it does with top-level occurences in SET_DESTs.
I think what we need is some way to do low-level regression testing and
debugging of reload. A special-purpose language with an rtl interface
would be kind of nice, but I can't see anybody investing the time to make
this happen. Plus, it might be seen as a possible backend interface
for NON-GPL frontends.
So I suppose the feasible option is to write some code with gen_rtx_*
that is direcly linked against reload*.o and all the support modules.
We can use some macros and/or variables to express things like
'stack slot out of addressable range' or 'stack slot so far out of
addressable range that it needs a tertiary reload'.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15265