[llvm-bugs] [Bug 42124] New: Incorrect inling cost calculation with new pass manager

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 4 13:31:30 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42124

            Bug ID: 42124
           Summary: Incorrect inling cost calculation with new pass
                    manager
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: yikong at google.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 22072
  --> https://bugs.llvm.org/attachment.cgi?id=22072&action=edit
Reduced reproducer

aec_port_reset_output_index is a small static method and is only called once.
There should be performance gain by inlining the method:

$ clang -c -w -O2 -Rpass=inline aec_port_reduced.c
aec_port_reduced.c:46:11: remark: aec_port_reset_output_index inlined into d
with (cost=-14955, threshold=225) [-Rpass=inline]
          aec_port_reset_output_index();
          ^

However with the new pass manager:

$ clang -c -w -fexperimental-new-pass-manager -O2 -Rpass-missed=inline
aec_port_reduced.c
aec_port_reduced.c:46:11: remark: aec_port_reset_output_index not inlined into
d because too costly to inline (cost=45, threshold=45) [-Rpass-missed=inline]
          aec_port_reset_output_index();
          ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190604/1507772b/attachment.html>


More information about the llvm-bugs mailing list