[Bug ipa/86395] add support of -fopt-info-inline in inliner

2019-02-20 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86395

David Malcolm  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from David Malcolm  ---
Oops, sorry.  Marking as resolved.

[Bug ipa/86395] add support of -fopt-info-inline in inliner

2019-02-20 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86395

Eric Gallager  changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #7 from Eric Gallager  ---
(In reply to Martin Liška from comment #6)
> David: Can the bug be marked as resolved?

WAITING on a reply

[Bug ipa/86395] add support of -fopt-info-inline in inliner

2018-11-20 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86395

--- Comment #6 from Martin Liška  ---
David: Can the bug be marked as resolved?

[Bug ipa/86395] add support of -fopt-info-inline in inliner

2018-11-08 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86395

--- Comment #5 from David Malcolm  ---
Author: dmalcolm
Date: Thu Nov  8 15:38:30 2018
New Revision: 265920

URL: https://gcc.gnu.org/viewcvs?rev=265920=gcc=rev
Log:
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.


Added:
trunk/gcc/testsuite/g++.dg/tree-ssa/inline-4.C
trunk/gcc/testsuite/gcc.dg/ipa/fopt-info-inline-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/invoke.texi
trunk/gcc/ipa-inline.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ipa/devirt-12.C
trunk/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C
trunk/gcc/testsuite/g++.dg/tree-prof/inline_mismatch_args.C
trunk/gcc/testsuite/g++.dg/tree-ssa/inline-1.C
trunk/gcc/testsuite/g++.dg/tree-ssa/inline-2.C
trunk/gcc/testsuite/g++.dg/tree-ssa/inline-3.C
trunk/gcc/testsuite/gcc.dg/ipa/inline-4.c
trunk/gcc/testsuite/gcc.dg/ipa/inline-7.c
trunk/gcc/testsuite/gcc.dg/ipa/inlinehint-4.c
trunk/gcc/testsuite/gcc.dg/plugin/dump-1.c
trunk/gcc/testsuite/gcc.dg/plugin/dump-2.c
  

[Bug ipa/86395] add support of -fopt-info-inline in inliner

2018-11-07 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86395

David Malcolm  changed:

   What|Removed |Added

   Keywords||patch
URL||https://gcc.gnu.org/ml/gcc-
   ||patches/2018-11/msg00463.ht
   ||ml

--- Comment #4 from David Malcolm  ---
Candidate patches: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00463.html

[Bug ipa/86395] add support of -fopt-info-inline in inliner

2018-10-04 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86395

David Malcolm  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|qinzhao at gcc dot gnu.org |dmalcolm at gcc dot 
gnu.org

--- Comment #3 from David Malcolm  ---
I'm looking at this.