https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111021

--- Comment #13 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #12)
> I think a "too broad" dependence isn't bad.  The cris specific solution also
> looks manageable, though I wonder what's special about x-protos.h, knowing
> very little of that area.

Thanks for the comments, I'll follow up with the former if no objections. :)

About {port}-protos.h, the documentation says "The ‘machine.h’ header is
included very early in GCC’s standard sequence of header files, while
‘machine-protos.h’ is included late in the sequence. Thus ‘machine-protos.h’
can include declarations referencing types that are not defined when
‘machine.h’ is included, specifically including those from ‘rtl.h’ and
‘tree.h’."

One special thing I noticed is that for the functions used in md files but
defined in ${port}.cc or others, they needs to be declared in {port}-protos.h,
since those generated insn-*.cc includes tm_p.h which includes {port}-protos.h
(and some other in tm_p_file_list like tm-preds.h target specific predicates).

Reply via email to