[all-commits] [llvm/llvm-project] 6a3c5d: [clang] Ensure -mno-outline adds attributes

Sam Elliott via All-commits all-commits at lists.llvm.org
Wed Oct 15 21:04:15 PDT 2025


  Branch: refs/heads/users/lenary/clangensure-mno-outlineaddsattributes
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a3c5d93b35ca4957b5b200c6ae9a4d9352811ef
      https://github.com/llvm/llvm-project/commit/6a3c5d93b35ca4957b5b200c6ae9a4d9352811ef
  Author: Sam Elliott <aelliott at qti.qualcomm.com>
  Date:   2025-10-15 (Wed, 15 Oct 2025)

  Changed paths:
    M clang/include/clang/Basic/CodeGenOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/test/CodeGen/attr-nooutline.c
    M clang/test/Driver/aarch64-outliner.c
    M clang/test/Driver/arm-machine-outliner.c
    M clang/test/Driver/riscv-outliner.c
    M clang/test/Driver/x86-outliner.c

  Log Message:
  -----------
  [clang] Ensure -mno-outline adds attributes

Before this change, `-mno-outline` and `-moutline` only controlled the
pass pipelines for the invoked compiler/linker.

The drawback of this implementation is that, when using LTO, only the
flag provided to the linker invocation is honoured (and any files which
individually use `-mno-outline` will have that flag ignored).

This change serialises the `-mno-outline` flag into each function's
IR/Bitcode, so that we can correctly disable outlining from functions in
files which disabled outlining, without affecting outlining choices for
functions from other files. This matches how other optimisation flags
are handled so the IR/Bitcode can be correctly merged during LTO.



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