https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63416

            Bug ID: 63416
           Summary: Three calls to empty functions via pointers get
                    folded, but not inlined
           Product: gcc
           Version: 4.7.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: felix.shvaiger at emc dot com

Created attachment 33620
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33620&action=edit
3 function calls -> folded, not inlined

Missed inlining opportunity.

Issue exists in x86 arch.
4.7, 4.8, 4.9, 5.0 versions (maybe earlier too).
Option: -O2, -O3

If 2 near-empty functions called via pointers, then calls get folded and
inlined.
If 3rd empty function call via pointer added, then all calls get folded, but
not inlined.

Attached test cases (self-contained, no includes):
a1.c -- 3 function calls -> folded, not inlined.

Reply via email to