This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix alpha and arm bootstrap failures
- From: Richard Henderson <rth at redhat dot com>
- To: Roger Sayle <roger at www dot eyesopen dot com>
- Cc: Richard Earnshaw <rearnsha at arm dot com>, Brad Lucier <lucier at math dot purdue dot edu>, gcc-patches at gcc dot gnu dot org, Kazu Hirata <kazu at cs dot umass dot edu>
- Date: Thu, 27 Feb 2003 00:23:24 -0800
- Subject: Re: [PATCH] Fix alpha and arm bootstrap failures
- References: <20030226225959.GC22978@redhat.com> <Pine.LNX.4.44.0302262302380.13920-100000@www.eyesopen.com>
On Wed, Feb 26, 2003 at 11:24:11PM -0700, Roger Sayle wrote:
> For non-libcall functions, the (use (mem:BLK (scratch))) used
> to distinguish pure from const functions is maintained in the
> CALL_INSN_FUNCTION_USAGE field of the CALL_INSN when the
> CONST_OR_PURE_CALL_P bit is set.
True, but irrelevant. The _arguments_ are the relevant part
to actually being able to CSE these functions. Which are in
the EXPR_LIST REG_EQUAL note.
> However I now appreciate having scanned more of the source code that
> the correct quick fix to Kazu's patch is something like:
>
> if (note && !find_reg_note (insn, REG_RETVAL, NULL_RTX))
> ...
>
> i.e. ignore REG_EQUAL notes on instructions that also have REG_RETVAL
> notes. This seems to be a fairly common idiom.
Also wrong. You'd miss folding __muldi3 when you find out
that its arguments are constant.
r~