RFA: hook doc patch (57/112): TARGET_SCHED_NEEDS_BLOCK_P

Gerald Pfeifer gerald@pfeifer.com
Sun Jan 17 23:40:00 GMT 2010


On Sun, 17 Jan 2010, Joern Rennecke wrote:
>>> -@deftypefn {Target Hook} int TARGET_SCHED_NEEDS_BLOCK_P (rtx @var{insn})
>>> +@deftypefn {Target Hook} bool TARGET_SCHED_NEEDS_BLOCK_P (int
>>> @var{dep_status})
>> Well, ia64_needs_block_p in config/ia64/ia64 has this as ds_t ts and
>> sinceit is the only use it would be really nice to have this consistent
>> both interms of the type and the name.
> Again, ds_t is defined in sched-int.h, and is thus unsuitable for target.h,
> and for target files in general.
> 
> config/ia64/ia64.c includes sched-int.h, and is thus free to use ds_t.

Ah, I see.  Still there is a problem: both haifa-sched.c and sel-sched.c
pass a ds_t to this hook, and ia64_needs_block_p then takes a ds_t.  Only
the actual hook uses an int which only works since "magically" ds_t and
int happen to be the same.  That doesn't strike me as good abstraction.

Vlad, do you see what I mean?  Is this something you could help with?
(By moving the definition of ds_t from sched-int.h to coretypes.h or
similar, perhaps?)

Gerald

PS: Jörn, your patch clearly improves the situation so it's okay for
now, but I'd really like to see this resolved still.


More information about the Gcc-patches mailing list