This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 4/4] Remove options.h/tm.h and function.h as dependencies and include compile time prerequisites in cgraph.h


On 06/25/2015 12:22 PM, Jeff Law wrote:
On 06/25/2015 07:27 AM, Andrew MacLeod wrote:

ipa_opt_pass is given a forward declaration in function.h, but it really
consumed by cgraph.h   By moving that forward declaration to cgraph, it
no longer requires function.h to be in the include path.   It actually
defined in tree-pass.h, the the *right* thing would be to require
tree-pass.h, but that seems unnecessary. Another option would be to do
the forward declaration in coretypes.h.. maybe that would be better?
It doesn't feel to me like ipa_opt_pass belongs in coretypes.h. I'd really prefer to not need ipa_opt_pass in cgraph.h, but as an interm step this seems fine.

yeah, the problem is that a cgraph node has a vector of these elements:

   /* Interprocedural passes scheduled to have their transform functions
     applied next time we execute local pass on them.  We maintain it
per-function in order to allow IPA passes to introduce new functions. */
  vec<ipa_opt_pass> GTY((skip)) ipa_transforms_to_apply;


I think its a shortcoming of the GTY parsing that I cant say
vec<struct ipa_opt_pass_d *> GTY((skip)) ipa_transforms_to_apply;

I tried that, and no cigar :-P


its not straightforward to get rid of completely without trickery. I'll leave it as is for now.

Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]