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, rtl-optimization]: Fix PR rtl-optimization/33638


Eric Botcazou <ebotcazou@libertysurf.fr> writes:

> > There is special code in calls.c to mark the stack usage of const
> > functions: around line 2700, in expand_call.  It seems to me that if
> > store_one_arg comes up with a different address, because it calls
> > memory_address, you should put that address also in
> > CALL_INSN_FUNCTION_USAGE.  That ought to fix the immediate problem as
> > well.
> 
> Does dse.c take into account CALL_INSN_FUNCTION_USAGE at all?  Flow.c did.

It does.  The problem is that CALL_INSN_FUNCTION_USAGE has a mem with
virtual-outgoing-args, but the actual store is done via a reg.  The
address was copied into the reg due to -fforce-addr.  This can be seen
in the RTL which Uros posted.

dse.c is not smart enough to see that the address in the
CALL_INSN_FUNCTION_USAGE is the same as the address in the register.
This is an issue that only arises for const functions.

Ian


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