Commit 8aab5218 by Martin Jambor Committed by Martin Jambor

re PR tree-optimization/53787 (Possible IPA-SRA / IPA-CP improvement)

2014-05-23  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/53787
	* params.def (PARAM_IPA_MAX_AA_STEPS): New param.
	* ipa-prop.h (ipa_node_params): Rename uses_analysis_done to
	analysis_done, update all uses.
	* ipa-prop.c: Include domwalk.h
	(param_analysis_info): Removed.
	(param_aa_status): New type.
	(ipa_bb_info): Likewise.
	(func_body_info): Likewise.
	(ipa_get_bb_info): New function.
	(aa_overwalked): Likewise.
	(find_dominating_aa_status): Likewise.
	(parm_bb_aa_status_for_bb): Likewise.
	(parm_preserved_before_stmt_p): Changed to use new param AA info.
	(load_from_unmodified_param): Accept func_body_info as a parameter
	instead of parms_ainfo.
	(parm_ref_data_preserved_p): Changed to use new param AA info.
	(parm_ref_data_pass_through_p): Likewise.
	(ipa_load_from_parm_agg_1): Likewise.  Update callers.
	(compute_complex_assign_jump_func): Changed to use new param AA info.
	(compute_complex_ancestor_jump_func): Likewise.
	(ipa_compute_jump_functions_for_edge): Likewise.
	(ipa_compute_jump_functions): Removed.
	(ipa_compute_jump_functions_for_bb): New function.
	(ipa_analyze_indirect_call_uses): Likewise, moved variable
	declarations down.
	(ipa_analyze_virtual_call_uses): Accept func_body_info instead of node
	and info, moved variable declarations down.
	(ipa_analyze_call_uses): Accept and pass on func_body_info instead of
	node and info.
	(ipa_analyze_stmt_uses): Likewise.
	(ipa_analyze_params_uses): Removed.
	(ipa_analyze_params_uses_in_bb): New function.
	(ipa_analyze_controlled_uses): Likewise.
	(free_ipa_bb_info): Likewise.
	(analysis_dom_walker): New class.
	(ipa_analyze_node): Handle node-specific forbidden analysis,
	initialize and free func_body_info, use dominator walker.
	(ipcp_modif_dom_walker): New class.
	(ipcp_transform_function): Create and free func_body_info, use
	ipcp_modif_dom_walker, moved a lot of functionality there.

From-SVN: r210864
parent 63b0b106
2014-05-23 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/53787
* params.def (PARAM_IPA_MAX_AA_STEPS): New param.
* ipa-prop.h (ipa_node_params): Rename uses_analysis_done to
analysis_done, update all uses.
* ipa-prop.c: Include domwalk.h
(param_analysis_info): Removed.
(param_aa_status): New type.
(ipa_bb_info): Likewise.
(func_body_info): Likewise.
(ipa_get_bb_info): New function.
(aa_overwalked): Likewise.
(find_dominating_aa_status): Likewise.
(parm_bb_aa_status_for_bb): Likewise.
(parm_preserved_before_stmt_p): Changed to use new param AA info.
(load_from_unmodified_param): Accept func_body_info as a parameter
instead of parms_ainfo.
(parm_ref_data_preserved_p): Changed to use new param AA info.
(parm_ref_data_pass_through_p): Likewise.
(ipa_load_from_parm_agg_1): Likewise. Update callers.
(compute_complex_assign_jump_func): Changed to use new param AA info.
(compute_complex_ancestor_jump_func): Likewise.
(ipa_compute_jump_functions_for_edge): Likewise.
(ipa_compute_jump_functions): Removed.
(ipa_compute_jump_functions_for_bb): New function.
(ipa_analyze_indirect_call_uses): Likewise, moved variable
declarations down.
(ipa_analyze_virtual_call_uses): Accept func_body_info instead of node
and info, moved variable declarations down.
(ipa_analyze_call_uses): Accept and pass on func_body_info instead of
node and info.
(ipa_analyze_stmt_uses): Likewise.
(ipa_analyze_params_uses): Removed.
(ipa_analyze_params_uses_in_bb): New function.
(ipa_analyze_controlled_uses): Likewise.
(free_ipa_bb_info): Likewise.
(analysis_dom_walker): New class.
(ipa_analyze_node): Handle node-specific forbidden analysis,
initialize and free func_body_info, use dominator walker.
(ipcp_modif_dom_walker): New class.
(ipcp_transform_function): Create and free func_body_info, use
ipcp_modif_dom_walker, moved a lot of functionality there.
2014-05-23 Marek Polacek <polacek@redhat.com> 2014-05-23 Marek Polacek <polacek@redhat.com>
Jakub Jelinek <jakub@redhat.com> Jakub Jelinek <jakub@redhat.com>
......
...@@ -10108,6 +10108,13 @@ an array access known, it adds a bonus of ...@@ -10108,6 +10108,13 @@ an array access known, it adds a bonus of
@option{ipa-cp-array-index-hint-bonus} bonus to the profitability @option{ipa-cp-array-index-hint-bonus} bonus to the profitability
score of the candidate. score of the candidate.
@item ipa-max-aa-steps
During its analysis of function bodies, IPA-CP employs alias analysis
in order to track values pointed to by function parameters. In order
not spend too much time analyzing huge functions, it will give up and
consider all memory clobbered after examining
@option{ipa-max-aa-steps} statements modifying memory.
@item lto-partitions @item lto-partitions
Specify desired number of partitions produced during WHOPR compilation. Specify desired number of partitions produced during WHOPR compilation.
The number of partitions should exceed the number of CPUs used for compilation. The number of partitions should exceed the number of CPUs used for compilation.
......
...@@ -371,8 +371,9 @@ struct ipa_node_params ...@@ -371,8 +371,9 @@ struct ipa_node_params
/* If this node is an ipa-cp clone, these are the known values that describe /* If this node is an ipa-cp clone, these are the known values that describe
what it has been specialized for. */ what it has been specialized for. */
vec<tree> known_vals; vec<tree> known_vals;
/* Whether the param uses analysis has already been performed. */ /* Whether the param uses analysis and jump function computation has already
unsigned uses_analysis_done : 1; been performed. */
unsigned analysis_done : 1;
/* Whether the function is enqueued in ipa-cp propagation stack. */ /* Whether the function is enqueued in ipa-cp propagation stack. */
unsigned node_enqueued : 1; unsigned node_enqueued : 1;
/* Whether we should create a specialized version based on values that are /* Whether we should create a specialized version based on values that are
......
...@@ -959,6 +959,12 @@ DEFPARAM (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS, ...@@ -959,6 +959,12 @@ DEFPARAM (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS,
"index known.", "index known.",
48, 0, 0) 48, 0, 0)
DEFPARAM (PARAM_IPA_MAX_AA_STEPS,
"ipa-max-aa-steps",
"Maximum number of statements that will be visited by IPA formal "
"parameter analysis based on alias analysis in any given function",
25000, 0, 0)
/* WHOPR partitioning configuration. */ /* WHOPR partitioning configuration. */
DEFPARAM (PARAM_LTO_PARTITIONS, DEFPARAM (PARAM_LTO_PARTITIONS,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment