[PATCH] D143624: Inlining: Run the legacy AlwaysInliner before the regular inliner.

Amara Emerson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 8 20:04:15 PST 2023


aemerson created this revision.
aemerson added reviewers: aeubanks, mtrofin, kazu.
aemerson added a project: LLVM.
Herald added subscribers: ormris, wenlei, steven_wu, hiraditya.
Herald added a project: All.
aemerson requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Herald added a project: clang.

We have situations where it's beneficial 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.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143624

Files:
  clang/test/CodeGen/code-coverage.c
  clang/test/Frontend/optimization-remark-with-hotness-new-pm.c
  clang/test/Headers/__clang_hip_math.hip
  clang/test/OpenMP/bug57757.cpp
  llvm/lib/Passes/PassBuilderPipelines.cpp
  llvm/test/Other/new-pm-defaults.ll
  llvm/test/Other/new-pm-thinlto-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
  llvm/test/Transforms/Inline/always-inline-newpm.ll
  llvm/test/Transforms/PhaseOrdering/ARM/arm_mult_q15.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143624.496010.patch
Type: text/x-patch
Size: 108291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230209/b3900faa/attachment-0001.bin>


More information about the cfe-commits mailing list