On Tue, 5 Nov 2013, Ilya Enkovich wrote: > On 01 Nov 21:59, Joseph S. Myers wrote: > > On Thu, 31 Oct 2013, Ilya Enkovich wrote: > > > > > * tree-chkp.c: New. > > > > This file includes tm.h. Inclusion of tm.h in front-end and GIMPLE files > > is discouraged (well, we'd like to convert all target macros to hooks, but > > the limited subset used in front-end and GIMPLE files are lower-hanging > > fruit than eliminating tm.h from the RTL parts of the compiler). If you > > need it, please put a comment on the #include saying exactly what target > > macros you need, so people know which macros' conversion to hooks would > > eliminate the need for the tm.h inclusion. > > There was a work to remove all target macros from this file. No all > target dependencies should go through hooks. Actually I can remove tm.h > include from this file but it does not guarantee it is not used because > it is implicitly included via expr.h, right?
So the next question is why this file includes expr.h. It's a tree-* file. The presumption is that it should not need anything to do with RTL and so shouldn't need to include expr.h, rtl.h or tm.h, directly or indirectly. If there are just a few bits of RTL-related code for this functionality, but most of it works on GIMPLE, I'd suggest separating the RTL pieces out into a separate file. -- Joseph S. Myers jos...@codesourcery.com