[all-commits] [llvm/llvm-project] 581b50: Analysis: Move LibcallLoweringInfo from CodeGen to...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Jul 17 06:10:19 PDT 2026


  Branch: refs/heads/users/arsenm/move-libcall-lowering-info-to-analysis
  Home:   https://github.com/llvm/llvm-project
  Commit: 581b505ee5988f81901c79ed9b1cc66a8d2c632e
      https://github.com/llvm/llvm-project/commit/581b505ee5988f81901c79ed9b1cc66a8d2c632e
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    A llvm/include/llvm/Analysis/LibcallLoweringInfo.h
    M llvm/include/llvm/CodeGen/LibcallLoweringInfo.h
    M llvm/lib/Analysis/CMakeLists.txt
    A llvm/lib/Analysis/LibcallLoweringInfo.cpp
    M llvm/lib/CodeGen/AtomicExpandPass.cpp
    M llvm/lib/CodeGen/DwarfEHPrepare.cpp
    M llvm/lib/CodeGen/ExpandIRInsts.cpp
    M llvm/lib/CodeGen/LibcallLoweringInfo.cpp
    M llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
    M llvm/lib/CodeGen/SafeStack.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
    M llvm/lib/CodeGen/StackProtector.cpp
    M llvm/lib/CodeGen/TargetLoweringBase.cpp
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64O0PreLegalizerCombiner.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
    M llvm/unittests/CodeGen/GlobalISel/GISelMITest.h

  Log Message:
  -----------
  Analysis: Move LibcallLoweringInfo from CodeGen to Analysis

Middle end passes need to be able to reason about library call
availability and potentially emit them without depending on codegen.
TargetLibraryInfo already lives in Analysis, and this is a step towards
the eventual merger. For now this is a mostly mechanical move, type erasing
the reference to TargetSubtargetInfo.

The per-subtarget customization (TargetSubtargetInfo::initLibcallLoweringInfo)
is inverted into a caller-supplied function_ref, so the Analysis types carry
no CodeGen/TargetSubtargetInfo reference. The module map is keyed on an opaque
erased pointer. CodeGen continues looking up based on the subtarget.

It is not yet in a state where it is usable from middle end passes; that will come
later. In principle we should be able to write arbitrary rules based on a function's
ABI attributes for which calls can be used.

Co-authored-by: Claude (Claude Opus 4.8) <noreply at anthropic.com>



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