aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorFeng Xue <fxue@os.amperecomputing.com>2019-10-16 07:27:50 +0000
committerFeng Xue <fxue@gcc.gnu.org>2019-10-16 07:27:50 +0000
commit4307a485c39fd1c317d6cead2707a903052c4753 (patch)
tree43e805a49dee12ec7f12a720d4e87a8a6ef39ed5 /gcc/doc
parent8cf9bbd2476bbacdcb8bc51ea2b2c020f3ea0168 (diff)
downloadgcc-4307a485c39fd1c317d6cead2707a903052c4753.zip
gcc-4307a485c39fd1c317d6cead2707a903052c4753.tar.gz
gcc-4307a485c39fd1c317d6cead2707a903052c4753.tar.bz2
Generalized IPA predicate on parameter reference
2019-10-16 Feng Xue <fxue@os.amperecomputing.com> PR ipa/91088 * doc/invoke.texi (ipa-max-param-expr-ops): Document new option. * params.def (PARAM_IPA_MAX_PARAM_EXPR_OPS): New. * ipa-predicat.h (struct expr_eval_op): New struct. (expr_eval_ops): New typedef. (struct condition): Add type and param_ops fields, remove size field. (add_condition): Replace size parameter with type parameter, add param_ops parameter. * ipa-predicat.c (expr_eval_ops_equal_p): New function. (predicate::add_clause): Add comparisons on type and param_ops. (dump_condition): Add debug dump for param_ops. (remap_after_inlining): Adjust call arguments to add_condition. (add_condition): Replace size parameter with type parameter, add param_ops parameter. Unshare constant value used in conditions. * ipa-fnsummary.c (evaluate_conditions_for_known_args): Fold parameter expressions using param_ops. (decompose_param_expr): New function. (set_cond_stmt_execution_predicate): Use call to decompose_param_expr to replace call to unmodified_parm_or_parm_agg_item. (set_switch_stmt_execution_predicate): Likewise. (will_be_nonconstant_expr_predicate): Likewise. Replace usage of size with type. (inline_read_section): Read param_ops from summary stream. (ipa_fn_summary_write): Write param_ops to summary stream. 2019-10-16 Feng Xue <fxue@os.amperecomputing.com> PR ipa/91088 * gcc.dg/ipa/pr91088.c: New test. * gcc.dg/ipa/pr91089.c: Add sub-test for range analysis. * g++.dg/tree-ssa/ivopts-3.C: Force a function to be noinline. From-SVN: r277054
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 4776926..1407d01 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -12034,6 +12034,13 @@ For switch exceeding this limit, IPA-CP will not construct cloning cost
predicate, which is used to estimate cloning benefit, for default case
of the switch statement.
+@item ipa-max-param-expr-ops
+IPA-CP will analyze conditional statement that references some function
+parameter to estimate benefit for cloning upon certain constant value.
+But if number of operations in a parameter expression exceeds
+@option{ipa-max-param-expr-ops}, the expression is treated as complicated
+one, and is not handled by IPA analysis.
+
@item lto-partitions
Specify desired number of partitions produced during WHOPR compilation.
The number of partitions should exceed the number of CPUs used for compilation.