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: [trunk]: Make IPA_PASS call ipa pass function once per compilation, rather than once per function.


Daniel Berlin wrote:
Errr, if we have two different sets of needs for passes (you said
"many of the passes" rther than "all of the passes"), why not just
have two different function pointers, one called once per function,
and one called once per compilation.
Then your ipa passes can choose which to function pointer to implement
based on their needs and will get called at the appropriate time.

I did that for the pair read_summary and function_read_summary. That is the only one of the ipa functions that may possibly need to work function by function.

kenny

On Thu, May 15, 2008 at 1:26 PM, Kenneth Zadeck
<zadeck@naturalbridge.com> wrote:
This patch changes the functions called from ipa_opt_pass from being called
once per cgraph node to once per compilation.   The problem is that many of
the passes that would fit into the category need to be called once per
compilation to generate the summary for everything.   This is particularly
true for the functions that are going to serialize and deserialize the
information.   With the exception of function bodies themselves, there will
only be one section in the .o file per type of ipa information and these
will in general (again with the exception of function bodies) only be
accessible on a per compilation unit basis.
This patch has been bootstrapped on x86-{64,32} but the regression tests are
still in the oven.   I wanted to get this in the patch queue before diego
leaves on vacation.

kenny


2008-05-15 Kenneth Zadeck <zadeck@naturalbridge.com>


  * cgraph.h (compute_inline_parameters): Made public.
  * tree-pass.h (ipa_opt_pass): Removed function_generate_summary,
  variable_generate_summary, function_write_summary,
  variable_write_summary, variable_read_summary.  Added
  generate_summary, write_summary, read_summary.
  * cgraphunit.c (cgraph_process_new_functions): Changed call from
  pass_ipa_inline.function_generate_summary, to
  compute_inline_parameters.
  * ipa-inline.c (compute_inline_parameters): Made public and added
  node parameter.
  (compute_inline_parameters_for_current): New function.
  (pass_inline_param): Now calls
  compute_inline_parameters_for_current.
  (inline_generate_summary): Removed parameter and made to loop over
  all cgraph nodes.
  (pass_ipa_inline): Updated for new IPA_PASS structure.
  * passes.c (execute_ipa_summary_passes): Now is called once per
  pass rather than once per node*pass.




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