[all-commits] [llvm/llvm-project] e9f1f0: [LLVM][libc] Defer lowering of constant intrinsics...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Sep 9 11:27:41 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9f1f00dd49cb382b3eaef136666664eaaa16450
      https://github.com/llvm/llvm-project/commit/e9f1f00dd49cb382b3eaef136666664eaaa16450
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-09-09 (Wed, 09 Sep 2026)

  Changed paths:
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    M llvm/test/Other/new-pm-defaults.ll
    M llvm/test/Other/new-pm-lto-defaults.ll
    A llvm/test/Transforms/PhaseOrdering/lto-is-constant.ll

  Log Message:
  -----------
  [LLVM][libc] Defer lowering of constant intrinsics in full LTO (#221505)

Summary:
This PR defers the lowering of the constant intrinsics. Currently it was
inheriting the default module pipeline and being done pessimistically in
the pre-link LTO phase. This means that some objects which would become
known constants were returned as failures. Doing this in the post-link
phase is more optimistic.

I included the `libc` change that justifies this in the PR, but it can
be split out if needed. The observation is that the ExpandVariadics pass
will lower most variadic calls on the GPU to an alloca of known size.
Using this opportunistically saves us a spill to stack ordinarily needed
to copy back the size from the GPU. Without this, every use of GPU
printf resulted in a spill to stack memory.

Hopefully this is benign enough.



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