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: repost: [DF] Use HARD_REG_SETs instead of bitmaps


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


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