Re: [PATCH 1/2] Handwritten part of conversion of IPA pass hooks to virtual functions

2013-10-25 Thread David Malcolm
On Thu, 2013-10-10 at 09:56 +0200, Richard Biener wrote: > As a general observation I don't like the > > if (pass->has_foo_member_function) >pass->foo_member_function () > > style. It is totally against the idea of having virtual functions. Why > not simply provide stub implementations in

Re: [PATCH 1/2] Handwritten part of conversion of IPA pass hooks to virtual functions

2013-10-10 Thread Richard Biener
As a general observation I don't like the if (pass->has_foo_member_function) pass->foo_member_function () style. It is totally against the idea of having virtual functions. Why not simply provide stub implementations in the base classes? Richard. On Thu, Oct 10, 2013 at 2:41 AM, David Mal

[PATCH 1/2] Handwritten part of conversion of IPA pass hooks to virtual functions

2013-10-09 Thread David Malcolm
* passes.c (ipa_opt_pass_d::generate_summary): New. (ipa_opt_pass_d::write_summary): New. (ipa_opt_pass_d::read_summary): New. (ipa_opt_pass_d::write_optimization_summary): New. (ipa_opt_pass_d::read_optimization_summary): New. (ipa_opt_pass_d::stmt_f