On Wed, Jul 27, 2011 at 10:29:43PM +0200, Paolo Bonzini wrote:
> On 07/27/2011 06:17 PM, Joseph S. Myers wrote:
> >>> --- gcc/target.h 2011-04-06 11:08:17 +0000
> >>> +++ gcc/target.h 2011-07-27 10:27:56 +0000
> >>> @@ -50,6 +50,7 @@
> >>> #define GCC_TARGET_H
> >>>
> >>> #include "tm.h"
> >>> +#include "hard-reg-set.h"
> >>> #include "insn-modes.h"
> >Please send a patch against current trunk. target.h hasn't included tm.h
> >for over a month. Since hard-reg-set.h depends on tm.h, you won't be able
> >to include hard-reg-set.h in target.h any more, so you'll need to find
> >another solution for that.
>
> For example you can make HARD_REG_SET always a struct, so that you
> can add a forward declaration in target.h. GCC is able to optimize
> the struct away, we rely on that.
I don't think it is a good idea. A single long HARD_REG_SET is actually
the common case, at least with 64-bit host, and while we can SRA a struct
often, several ABIs pass structures less efficiently than plain longs.
Jakub