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

Pierre van Houtryve via All-commits all-commits at lists.llvm.org
Wed Apr 16 02:49:46 PDT 2025


  Branch: refs/heads/users/pierre-vh/amdsplitmodule-skip-parts
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d0f978b0d7e2d3c4b2cf76b8ed80da60e54ec3b
      https://github.com/llvm/llvm-project/commit/2d0f978b0d7e2d3c4b2cf76b8ed80da60e54ec3b
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2025-04-16 (Wed, 16 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.


  Commit: c1a06b27725141a4b8dad78cef6aa4f78bb5999a
      https://github.com/llvm/llvm-project/commit/c1a06b27725141a4b8dad78cef6aa4f78bb5999a
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2025-04-16 (Wed, 16 Apr 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp

  Log Message:
  -----------
  comments


Compare: https://github.com/llvm/llvm-project/compare/d44f28b63202...c1a06b277251

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