This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: repost: [DF] Use HARD_REG_SETs instead of bitmaps
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Dimitrios Apostolou <jimis at gmx dot net>
- Date: Sun, 6 Nov 2011 13:55:08 +0100
- Subject: Re: repost: [DF] Use HARD_REG_SETs instead of bitmaps
- References: <alpine.LNX.2.02.1108221923570.1374@localhost.localdomain> <4E528F62.5030901@redhat.com> <alpine.LNX.2.02.1110232231420.13386@localhost.localdomain> <4EB679A5.4060309@gnu.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Nov 06, 2011 at 01:12:21PM +0100, Paolo Bonzini wrote:
> On 11/06/2011 03:19 AM, Dimitrios Apostolou wrote:
> >
> >I understand major hassle is when the register file is big, too much
> >data is being copied on a function call, when it has a HARD_REG_SET as a
> >pass by value parameter. So I did some testing on SPARC, which has the
> >biggest register file I know of, and there is a small performance
> >regression indeed. On the other hand I really like the code reduction in
> >hard-reg-set.h. So how should I proceed? FWIW I'm already testing
> >passing the parameter by reference in the hottest functions.
>
> What about adding a macro indirection to more functions (like you
> did with SET_HARD_REG_BIT and friends), so that pass-by-value can be
> changed to pass-by-reference without affecting all the uses
> throughout the compiler?
Or keep HARD_REG_SET type as is and just use a new struct type which
contains HARD_REG_SET or HARD_REG_SET * in it.
struct hard_reg_set_ptr;
void (*live_on_entry) (struct hard_reg_set_ptr *);
in the target* headers and
struct hard_reg_set_ptr { HARD_REG_SET *set; };
as the actual definition.
Jakub