[all-commits] [llvm/llvm-project] 5fe102: [llvm][inliner] Reuse the inliner pass to implemen...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Mon Nov 30 12:04:04 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5fe10263ab39be96e316f37272b85a72596a7928
      https://github.com/llvm/llvm-project/commit/5fe10263ab39be96e316f37272b85a72596a7928
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2020-11-30 (Mon, 30 Nov 2020)

  Changed paths:
    M clang/test/CodeGen/thinlto-distributed-newpm.ll
    M clang/test/Frontend/optimization-remark-line-directive.c
    M clang/test/Frontend/optimization-remark-new-pm.c
    M clang/test/Frontend/optimization-remark-with-hotness-new-pm.c
    M clang/test/Frontend/optimization-remark.c
    M llvm/include/llvm/Analysis/InlineAdvisor.h
    M llvm/include/llvm/Passes/PassBuilder.h
    M llvm/lib/Analysis/InlineAdvisor.cpp
    M llvm/lib/Analysis/MLInlineAdvisor.cpp
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Transforms/IPO/Inliner.cpp
    M llvm/test/Other/new-pm-defaults.ll
    M llvm/test/Other/new-pm-lto-defaults.ll
    M llvm/test/Other/new-pm-module-inliner-wrapper.ll
    M llvm/test/Other/new-pm-thinlto-defaults.ll
    M llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
    M llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
    M llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
    M llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
    M llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll
    M llvm/test/Transforms/Inline/ML/bounds-checks.ll
    M llvm/test/Transforms/Inline/inline_stats.ll
    M llvm/test/Transforms/Inline/pr46945.ll

  Log Message:
  -----------
  [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

Enable performing mandatory inlinings upfront, by reusing the same logic
as the full inliner, instead of the AlwaysInliner. This has the
following benefits:
- reduce code duplication - one inliner codebase
- open the opportunity to help the full inliner by performing additional
function passes after the mandatory inlinings, but before th full
inliner. Performing the mandatory inlinings first simplifies the problem
the full inliner needs to solve: less call sites, more contextualization, and,
depending on the additional function optimization passes run between the
2 inliners, higher accuracy of cost models / decision policies.

Note that this patch does not yet enable much in terms of post-always
inline function optimization.

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




More information about the All-commits mailing list