[all-commits] [llvm/llvm-project] 1a2e77: Revert "Revert "Inlining: Run the legacy AlwaysInl...

Amara Emerson via All-commits all-commits at lists.llvm.org
Sat Oct 28 23:21:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1a2e77cf9e11dbf56b5720c607313a566eebb16e
      https://github.com/llvm/llvm-project/commit/1a2e77cf9e11dbf56b5720c607313a566eebb16e
  Author: Amara Emerson <amara at apple.com>
  Date:   2023-10-28 (Sat, 28 Oct 2023)

  Changed paths:
    M clang/test/Frontend/optimization-remark-with-hotness-new-pm.c
    M clang/test/Headers/__clang_hip_math.hip
    M clang/test/OpenMP/bug57757.cpp
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    M llvm/test/Other/new-pm-defaults.ll
    M llvm/test/Other/new-pm-print-pipeline.ll
    M llvm/test/Other/new-pm-thinlto-postlink-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-defaults.ll
    M llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
    M llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
    A llvm/test/Transforms/Inline/always-inline-phase-ordering.ll

  Log Message:
  -----------
  Revert "Revert "Inlining: Run the legacy AlwaysInliner before the regular inliner.""

This reverts commit 86bfeb906e3a95ae428f3e97d78d3d22a7c839f3.

This is a long time coming re-application that was originally reverted due to
regressions, unrelated to the actual inlining change. These regressions have since
been fixed due to another long-in-the-making change of a66051c6 landing.

Original commit message for reference:
---
    We have several situations where it's beneficial for code size to ensure that every
    call to always-inline functions are inlined before normal inlining decisions are
    made. While the normal inliner runs in a "MandatoryOnly" mode to try to do this,
    it only does it on a per-SCC basis, rather than the whole module. Ensuring that
    all mandatory inlinings are done before any heuristic based decisions are made
    just makes sense.

    Despite being referred to the "legacy" AlwaysInliner pass, it's already necessary
    for -O0 because the CGSCC inliner is too expensive in compile time to run at -O0.

    This also fixes an exponential compile time blow up in
    https://github.com/llvm/llvm-project/issues/59126

    Differential Revision: https://reviews.llvm.org/D143624
---




More information about the All-commits mailing list