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: IPA merge 3: passmanager tweeks


Jan Hubicka wrote on 12/02/06 09:50:

This patch also makes working stuff like TODO_dump_function at the end of IPA
pass and hopefully brings us closer to plan of using pass manager instead of
all the current funny interaction in between cgraphunit, passes and
tree-optimize.

Yes, that's sorely needed.

Bootstrapped/regtested i686-linux, OK?

	* omp-low.c (expand_omp_parallel): Set function properties.
	* function.h (struct function): Add curr_properties and last_verified.
	* passes.c (register_dump_files): Do not set TODO_set_props for the
	first pass
	(init_optimization_passes): Set it here; reorder initialization so the
	dump files appear in more logic order.
s/logic/logical/

	(last_verified, curr_properties): Kill.
	(do_per_function): New function.
	(execute_function_todo): Break out from ...
	(execute_todo): ... here; handle per-function flags.
	(clear_last_verified, verify_curr_properties,
	update_properties_after_pass): New functions.
	(execute_one_pass): Handle per-function properties.
	(execute_ipa_pass_list): Use do_per_function; sanity check that cfun
	and current_function_decls are cleared out.
	* ipa-cp.c (constant_val_insert): Clear cfun/current_function_decl
	after use.
        cgraph_add_new_function (child_fn);

OK, with some revisions.

+ /* Properties used by the passmanager. */
s/passmanager/pass manager/

! /* Call CALLBACK for every function if current function is not set
!    (ie we do IPA) and for current function otehrwise.  */

Rephrase. Maybe

/* If we are in IPA mode (i.e., current_function_decl is NULL), call
  function CALLBACK for every function in the call graph.  Otherwise,
  call CALLBACK on the current function.  */

! /* Perform all TODO actions that ought to be done at function basis.  */
! static void

Vertical spacing after comment.  What did you mean with 'at function
basis'?  Did you mean 'on every function'?

! /* Clear the last verified flag.  */
! static void

Vertical spacing after comment.

! clear_last_verified (void *data ATTRIBUTE_UNUSED)
! {
! cfun->last_verified = 0;
! }
! /* Helper function. Verify that the properties has been turn into the
! properties expected by the pass. */
! static void


Likewise.

! /* After executing the pass, apply expected changes to the function properties.
!    */

Watch wrapping.


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