[all-commits] [llvm/llvm-project] 8062e8: [Clang] Emit LLVM flatten attribute instead of per...

Grigory Pastukhov via All-commits all-commits at lists.llvm.org
Mon Apr 27 13:07:01 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8062e82db89f12d90e8c331db217904689b87947
      https://github.com/llvm/llvm-project/commit/8062e82db89f12d90e8c331db217904689b87947
  Author: Grigory Pastukhov <99913765+grigorypas at users.noreply.github.com>
  Date:   2026-04-27 (Mon, 27 Apr 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/test/CodeGen/AArch64/sme-inline-callees-streaming-attrs.c
    M clang/test/CodeGen/flatten.c

  Log Message:
  -----------
  [Clang] Emit LLVM flatten attribute instead of per-callsite alwaysinline (#188615)

Follow-up to #174899 which added the flatten function attribute to LLVM
IR and implemented recursive inlining in the `AlwaysInliner` pass.

This patch updates Clang to emit the LLVM flatten attribute on functions
with `__attribute__((flatten))`, instead of the previous approach of
marking each call site with `alwaysinline`. This completes the
transition to matching GCC's flatten semantics.

  Changes:
  - Remove the callsite `alwaysinline` annotation logic from CGCall.cpp
  - Emit the flatten function attribute in CodeGenModule.cpp
  - Update clang/test/CodeGen/flatten.c to reflect the new IR output
- Update clang/test/CodeGen/AArch64/sme-inline-callees-streaming-attrs.c
to reflect the new behavior
  - Add release notes documenting the behavior change

RFC:
https://discourse.llvm.org/t/rfc-function-level-flatten-depth-attribute-for-depth-limited-inlining



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list