[all-commits] [llvm/llvm-project] 2b0bb1: CodeGen: Add LibcallLoweringInfo analysis pass

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Nov 25 15:21:08 PST 2025


  Branch: refs/heads/users/arsenm/codegen/add-libcall-lowering-info-analysis
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b0bb19b04bcf7c7198796a79104e68af2e0cb77
      https://github.com/llvm/llvm-project/commit/2b0bb19b04bcf7c7198796a79104e68af2e0cb77
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-11-25 (Tue, 25 Nov 2025)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M llvm/include/llvm/Analysis/RuntimeLibcallInfo.h
    M llvm/include/llvm/CodeGen/LibcallLoweringInfo.h
    M llvm/include/llvm/InitializePasses.h
    M llvm/lib/Analysis/RuntimeLibcallInfo.cpp
    M llvm/lib/CodeGen/CodeGen.cpp
    M llvm/lib/CodeGen/ExpandFp.cpp
    M llvm/lib/CodeGen/LibcallLoweringInfo.cpp
    M llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/test/CodeGen/AArch64/O0-pipeline.ll
    M llvm/test/CodeGen/AArch64/O3-pipeline.ll
    M llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
    M llvm/test/CodeGen/LoongArch/O0-pipeline.ll
    M llvm/test/CodeGen/LoongArch/opt-pipeline.ll
    M llvm/test/CodeGen/PowerPC/O0-pipeline.ll
    M llvm/test/CodeGen/PowerPC/O3-pipeline.ll
    M llvm/test/CodeGen/RISCV/O0-pipeline.ll
    M llvm/test/CodeGen/RISCV/O3-pipeline.ll
    M llvm/test/CodeGen/SPIRV/llc-pipeline.ll
    M llvm/test/CodeGen/X86/O0-pipeline.ll
    M llvm/test/CodeGen/X86/opt-pipeline.ll
    M llvm/test/Transforms/ExpandFp/AMDGPU/frem-inf.ll
    M llvm/test/Transforms/ExpandFp/AMDGPU/frem.ll
    A llvm/test/Transforms/ExpandFp/AMDGPU/missing-analysis.ll
    M llvm/test/Transforms/ExpandFp/AMDGPU/pass-parameters.ll
    M llvm/test/Transforms/ExpandLargeFpConvert/X86/expand-large-fp-convert-fptosi129.ll
    M llvm/test/Transforms/ExpandLargeFpConvert/X86/expand-large-fp-convert-fptoui129.ll
    M llvm/test/Transforms/ExpandLargeFpConvert/X86/expand-large-fp-convert-si129tofp.ll
    M llvm/test/Transforms/ExpandLargeFpConvert/X86/expand-large-fp-convert-ui129tofp.ll
    M llvm/test/Transforms/ExpandLargeFpConvert/X86/expand-large-fp-optnone.ll
    M llvm/tools/llc/NewPMDriver.cpp
    M llvm/tools/llc/llc.cpp
    M llvm/tools/opt/NewPMDriver.cpp
    M llvm/tools/opt/NewPMDriver.h
    M llvm/tools/opt/optdriver.cpp

  Log Message:
  -----------
  CodeGen: Add LibcallLoweringInfo analysis pass

The libcall lowering decisions should be program dependent,
depending on the current module's RuntimeLibcallInfo. We need
another related analysis derived from that plus the current
function's subtarget to provide concrete lowering decisions.

This takes on a somewhat unusual form. It's a Module analysis,
with a lookup keyed on the subtarget. This is a separate module
analysis from RuntimeLibraryAnalysis to avoid that depending on
codegen. It's not a function pass to avoid depending on any
particular function, to avoid repeated subtarget map lookups in
most of the use passes, and to avoid any recomputation in the
common case of one subtarget (and keeps it reusable across
repeated compilations).

This also switches ExpandFp and PreISelIntrinsicLowering as
a sample function and module pass. Note this is not yet wired
up to SelectionDAG, which is still using the LibcallLoweringInfo
constructed inside of TargetLowering.



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