On Tue, Jan 7, 2014 at 7:42 PM, Andrew MacLeod <amacl...@redhat.com> wrote:
> On 01/07/2014 06:47 PM, Xinliang David Li wrote:
>>
>> A related question. I have not followed the header file restructuring
>> discussion.  Is there a documentation on header file structure and how
>> they are organized? In a new .c file, simply including gimple.h would
>> require many rounds of iterations to find missing headers via trial
>> (compilation) and error.
>>
>> thanks,
>>
>>
> Not as yet...  right now its in a cleanup phase where we are trying to
> flatten it out so we can get see where things are actually coming from and
> how they are used, and then relocate/reorganize things into sensible places.
>
> In an ideal world, Id like to eventually see the core component files,
> tree.h, gimple.h and rtl.h include all the basic files those components
> need, then each .c file can add whatever else is needed...  but we'll see
> when we get closer.

Yes -- wrapper headers can be introduced to form a hierarchy of
headers. Each core areas in GCC deserves one such header. For
instance, all interfaces for IR browsing, all interfaces for IR
manipulation, IPA (cgraph, symtab, varpool etc), cfg, aliaser etc.

> Andrew
>
> PS In reality, for now creating a new .c file probably isn't much different
> than it was before... you find some other .c file, copy the #includes from
> that, and go from there :-)

yeah. In the ideal world, we should be able to not rely on cut&paste
and easily come up with the minimal set of headers needed ...

thanks,

David
>

Reply via email to