aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tree-ssa/inline-2.C
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2018-11-08 15:38:30 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2018-11-08 15:38:30 +0000
commit4174a33ac66f45536e3d7bd46167d7f678310931 (patch)
tree5235bd90981bc2004687d8de9394f82565c2c784 /gcc/testsuite/g++.dg/tree-ssa/inline-2.C
parent204839e7c41678c3f93975fe4356492040fcf411 (diff)
ipa-inline.c/tree-inline.c: port from fprintf to dump API (PR ipa/86395)
This patch ports various fprintf calls in the inlining code to using the dump API, using the %C format code for printing cgraph_node *. I focussed on the dump messages that seemed most significant to end-users; I didn't port all of the calls. Doing so makes this information appear in -fopt-info and in optimization records, rather than just in the dump_file. It also changes the affected dumpfile-dumps from being unconditional (assuming the dump_file is enabled) to being guarded by the MSG_* status. Hence various tests with dg-final scan-*-dump directives need to gain "-all" or "-optimized" suffixes to -fdump-ipa-inline. The use of %C throughout also slightly changes the dump format for several messages, e.g. changing: Inlining void inline_me(char*) into int main(int, char**). to: ../../src/gcc/testsuite/g++.dg/tree-ssa/inline-1.C:13:8: optimized: Inlining void inline_me(char*)/0 into int main(int, char**)/2. amongst other things adding "/order" suffixes to the cgraph node names. gcc/ChangeLog: PR ipa/86395 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized", "-missed", "-note", and "-all" sub-options. * ipa-inline.c (caller_growth_limits): Port from fprintf to dump API. (can_early_inline_edge_p): Likewise. (want_early_inline_function_p): Likewise. (want_inline_self_recursive_call_p): Likewise. (recursive_inlining): Likewise. (inline_small_functions): Likewise. (flatten_function): Likewise. (ipa_inline): Likewise. (inline_always_inline_functions): Likewise. (early_inline_small_functions): Likewise. (early_inliner): Likewise. * tree-inline.c (expand_call_inline): Likewise. gcc/testsuite/ChangeLog: PR ipa/86395 * g++.dg/ipa/devirt-12.C: Add "-all" suffix to "-fdump-ipa-inline". * g++.dg/ipa/imm-devirt-1.C: Add "-optimized" suffix to "-fdump-tree-einline". * g++.dg/tree-prof/inline_mismatch_args.C: Add "-all" suffix to "-fdump-tree-einline". * g++.dg/tree-ssa/inline-1.C: Add "-optimized" suffix to "-fdump-tree-einline". * g++.dg/tree-ssa/inline-2.C: Likewise. * g++.dg/tree-ssa/inline-3.C: Likewise. * g++.dg/tree-ssa/inline-4.C: New test, based on inline-1.C, but using "-fopt-info-inline". * gcc.dg/ipa/fopt-info-inline-1.c: New test. * gcc.dg/ipa/inline-4.c: Add "-all" suffix to "-fdump-ipa-inline". Add "-fopt-info-inline" and dg-optimized directive. * gcc.dg/ipa/inline-7.c: Add "-optimized" suffix to "-fdump-tree-einline". Add "-fopt-info-inline" and dg-optimized directive. Update scan-tree-dump-times to reflect /order suffixes. * gcc.dg/ipa/inlinehint-4.c: Update scan-tree-dump-times to reflect /order suffixes. * gcc.dg/plugin/dump-1.c: Add "-loop" to "-fopt-info-note" to avoid getting extra messages from inliner. * gcc.dg/plugin/dump-2.c: Likewise. * gcc.dg/pr26570.c: Add dg-prune-output to ignore new "function body not available" missed optimization messages. * gcc.dg/pr71969-2.c: Update scan-tree-dump-times to reflect /order suffixes. * gcc.dg/pr71969-3.c: Likewise. * gcc.dg/tree-ssa/inline-11.c: Add "-all" suffix to "-fdump-tree-einline". * gcc.dg/tree-ssa/inline-3.c: Add "-optimized" suffix to "-fdump-tree-einline". Update scan-tree-dump-times to reflect /order suffixes. * gcc.dg/tree-ssa/inline-4.c: Add "-optimized" suffix to "-fdump-tree-einline". Add "-fopt-info-inline" and dg-optimized directive. * gcc.dg/tree-ssa/inline-8.c: Add "-optimized" suffix to "-fdump-tree-einline". * gfortran.dg/pr79966.f90: Update scan-ipa-dump to reflect /order suffixes. From-SVN: r265920
Diffstat (limited to 'gcc/testsuite/g++.dg/tree-ssa/inline-2.C')
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/inline-2.C2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/tree-ssa/inline-2.C b/gcc/testsuite/g++.dg/tree-ssa/inline-2.C
index 79f807cd220..b72f6523bea 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/inline-2.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/inline-2.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=3" } */
+/* { dg-options "-O2 -fdump-tree-einline-optimized --param max-early-inliner-iterations=3" } */
/* { dg-add-options bind_pic_locally } */
namespace std {