[all-commits] [llvm/llvm-project] 53e5e5: [NewPM][Inliner] Make inlined calls to functions i...

aeubanks via All-commits all-commits at lists.llvm.org
Mon Mar 7 23:54:17 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 53e5e586709a329370ea268a8e8191b16fd641b7
      https://github.com/llvm/llvm-project/commit/53e5e586709a329370ea268a8e8191b16fd641b7
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2022-03-07 (Mon, 07 Mar 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/InlineCost.h
    M llvm/lib/Analysis/InlineCost.cpp
    M llvm/lib/Transforms/IPO/Inliner.cpp
    M llvm/test/Transforms/Inline/inline-cost-attributes.ll
    A llvm/test/Transforms/Inline/mut-rec-scc-2.ll
    A llvm/test/Transforms/Inline/mut-rec-scc.ll

  Log Message:
  -----------
  [NewPM][Inliner] Make inlined calls to functions in same SCC as callee exponentially expensive

Introduce a new attribute "function-inline-cost-multiplier" which
multiplies the inline cost of a call site (or all calls to a callee) by
the multiplier.

When processing the list of calls created by inlining, check each call
to see if the new call's callee is in the same SCC as the original
callee. If so, set the "function-inline-cost-multiplier" attribute of
the new call site to double the original call site's attribute value.
This does not happen when the original call site is intra-SCC.

This is an alternative to D120584, which marks the call sites as
noinline.

Hopefully fixes PR45253.

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D121084




More information about the All-commits mailing list