[all-commits] [llvm/llvm-project] d44f28: [AMDGPU][SplitModule] Do not create empty modules

Pierre van Houtryve via All-commits all-commits at lists.llvm.org
Tue Apr 15 01:39:36 PDT 2025


  Branch: refs/heads/users/pierre-vh/amdsplitmodule-skip-parts
  Home:   https://github.com/llvm/llvm-project
  Commit: d44f28b6320242f0133e57a3a6854c836be7d054
      https://github.com/llvm/llvm-project/commit/d44f28b6320242f0133e57a3a6854c836be7d054
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2025-04-15 (Tue, 15 Apr 2025)

  Changed paths:
    M llvm/include/llvm/Target/TargetMachine.h
    M llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
    M llvm/test/tools/llvm-split/AMDGPU/address-taken-externalize-with-call.ll
    M llvm/test/tools/llvm-split/AMDGPU/large-kernels-merging-weak_odr.ll
    M llvm/test/tools/llvm-split/AMDGPU/large-kernels-merging.ll
    A llvm/test/tools/llvm-split/AMDGPU/preserve-globals.ll

  Log Message:
  -----------
  [AMDGPU][SplitModule] Do not create empty modules

Skip creating a module if no function is going to be imported.
Also includes a change so that if the first partition is empty (which can happen),
we import global with non-local linkage into the first non-empty partition, instead
of P0 all the time.

I thought we'd need to change users of the SplitModule callback so they can deal with less modules
than the number requested, but no. We already return only 1 module in some cases and
it seems to be handled just fine.



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