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] Fix alpha and arm bootstrap failures


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~


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