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 overzealous DSE on sparc


From: Richard Sandiford <rdsandiford@googlemail.com>
Date: Wed, 02 May 2012 20:37:58 +0100

> I think the problem is in the way sparc.c:emit_soft_tfmode_libcall
> reuses existing MEMs when passing arguments on the stack:
> 
> 	  if (GET_CODE (this_arg) == MEM
> 	      && ! force_stack_temp)
> 	    this_arg = XEXP (this_arg, 0);
> 
> -ffloat-store forces "a" and "b" to be stored in their argument slots,
> and emit_soft_tfmode_libcall then passes the address of these incoming
> argument slots to the libcall.  But "a" and "b" don't escape, so DSE
> thinks that the call can't read them.

I'm fine with adjusting how we emit libcalls to better show the compiler
what's going on.

Can you suggest a way that we can mark these MEMs so that the rest of
the compiler will know that these values can in fact escape?


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