public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Your assign_parms changes
@ 2003-12-18  4:28 Richard Kenner
  2003-12-18  4:38 ` David Edelsohn
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Kenner @ 2003-12-18  4:28 UTC (permalink / raw)
  To: dje; +Cc: gcc

    The patch is trying to prevent GCC from pessimizing code generated for
    argument passing when the word size within the function is larger than
    the word size specified in the ABI for argument passing.  

Right, I understand that, but then why the second change to prohibit this
from being done for CONCAT, which seems a very valuable case?

    I guess we need to update max_parm_reg appropriately when we
    allocate the new reg to operate as a parm within the function.

Most certainly.  And also the parm stack location.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Your assign_parms changes
  2003-12-18  4:28 Your assign_parms changes Richard Kenner
@ 2003-12-18  4:38 ` David Edelsohn
  0 siblings, 0 replies; 4+ messages in thread
From: David Edelsohn @ 2003-12-18  4:38 UTC (permalink / raw)
  To: Richard Kenner, Fariborz Jahanian; +Cc: gcc

>>>>> Richard Kenner writes:

Richard> Right, I understand that, but then why the second change to prohibit this
Richard> from being done for CONCAT, which seems a very valuable case?

	See the discussion thread started by Eric Botcazou:

http://gcc.gnu.org/ml/gcc-patches/2003-12/msg00031.html

The CONCAT generated for complex parameters produced additional spilling
and worse code.

David

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Your assign_parms changes
  2003-12-18  1:57 Richard Kenner
@ 2003-12-18  4:01 ` David Edelsohn
  0 siblings, 0 replies; 4+ messages in thread
From: David Edelsohn @ 2003-12-18  4:01 UTC (permalink / raw)
  To: Richard Kenner, Fariborz Jahanian; +Cc: gcc

>>>>> Richard Kenner writes:

Richard> On closer look, that's the only one that causes problems with max_parm_reg.
Richard> But I don't understand either of them.

Richard> The first change (revision 1.469) seems fine: you can store the group even 
Richard> if it's a CONCAT, at least I think so.  So I don't understand the second
Richard> change (1.472).  But the real problem appears to be that you set DECL_RTL
Richard> of a PARM_DECL to a REG (or CONCAT) but never update max_parm_regs.

	After reading the comments in the function, the mailinglist
archive can help shed more light on the patch, the authors of the patch
and the motivation for the patch.

	The patch is trying to prevent GCC from pessimizing code generated
for argument passing when the word size within the function is larger than
the word size specified in the ABI for argument passing.  For example,
passing a 64-bit long long int in two GPRs (each treated as 32-bits wide),
but utilizing 64-bit GPRs and 64-bit computation within the function.  If
the parameter is passed in two GPRs, GCC can form the 64-bit quantity
using register operations instead of using stack memory as an intermediate
location to concatenate the pieces.

	I guess we need to update max_parm_reg appropriately when we
allocate the new reg to operate as a parm within the function.

David

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Your assign_parms changes
@ 2003-12-18  1:57 Richard Kenner
  2003-12-18  4:01 ` David Edelsohn
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Kenner @ 2003-12-18  1:57 UTC (permalink / raw)
  To: dje; +Cc: gcc

On closer look, that's the only one that causes problems with max_parm_reg.

But I don't understand either of them.

The first change (revision 1.469) seems fine: you can store the group even 
if it's a CONCAT, at least I think so.  So I don't understand the second
change (1.472).  But the real problem appears to be that you set DECL_RTL
of a PARM_DECL to a REG (or CONCAT) but never update max_parm_regs.

See my last message for more.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-12-18  3:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-18  4:28 Your assign_parms changes Richard Kenner
2003-12-18  4:38 ` David Edelsohn
  -- strict thread matches above, loose matches on Subject: below --
2003-12-18  1:57 Richard Kenner
2003-12-18  4:01 ` David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).