[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-26 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I'm thinking this should be default only for HIP (maybe OpenMP later) because the option is HIP only and it confounds attempts to override it by inserting a linker option otherwise. https://github.com/llvm/llvm-project/pull/128509 ___

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-26 Thread Joseph Huber via cfe-commits
@@ -1393,6 +1393,8 @@ def fhip_emit_relocatable : Flag<["-"], "fhip-emit-relocatable">, HelpText<"Compile HIP source to relocatable">; def fno_hip_emit_relocatable : Flag<["-"], "fno-hip-emit-relocatable">, HelpText<"Do not override toolchain to compile HIP source to reloc

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-26 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Thinking on this, might just be a very poor interaction between `-lto-partitions` and `-lto-emit-llvm`. Since it splits it up. https://github.com/llvm/llvm-project/pull/128509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-26 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Reverting this patch locally also fixes one of the `libc` tests that was failing, so I'm going to assume they're related. https://github.com/llvm/llvm-project/pull/128509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-26 Thread Joseph Huber via cfe-commits
@@ -708,6 +712,34 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D, options::OPT_m_amdgpu_Features_Group); } +static unsigned GetFullLTOPartitions(const Driver &D, const ArgList &Args) { + const Arg *A = Args.getLastArg(options::OPT_flto_par

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-26 Thread Joseph Huber via cfe-commits
@@ -708,6 +711,33 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D, options::OPT_m_amdgpu_Features_Group); } +static unsigned getFullLTOPartitions(const Driver &D, const ArgList &Args) { + const Arg *A = Args.getLastArg(options::OPT_flto_par

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-26 Thread Joseph Huber via cfe-commits
jhuber6 wrote: This seems to have broken LTO linking / introduced some non-determinism. I noticed that the LLVM libc `crt1.o` file was missing a lot of definitions for some reason and traces it back to this. Here's the IR that comes out of `clang` https://godbolt.org/z/4fz35PaPb. If we take t

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/18769 Here is the relevant piece of the build lo

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-24 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh edited https://github.com/llvm/llvm-project/pull/128509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-24 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh closed https://github.com/llvm/llvm-project/pull/128509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-24 Thread Pierre van Houtryve via cfe-commits
Pierre-vh wrote: @shiltian PSDB passed, is it enough to land? https://github.com/llvm/llvm-project/pull/128509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-24 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/128509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-17 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh updated https://github.com/llvm/llvm-project/pull/128509 >From e580bbe66a5d65e90051cb0906b87478341696e6 Mon Sep 17 00:00:00 2001 From: pvanhout Date: Mon, 24 Feb 2025 14:21:49 +0100 Subject: [PATCH 1/5] [clang][AMDGPU] Enable module splitting by default The default

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-15 Thread Pierre van Houtryve via cfe-commits
Pierre-vh wrote: I'll get it tested internally ASAP. I wasn't confident in the driver changes so I was waiting for more feedback before doing it I'll update once I get results https://github.com/llvm/llvm-project/pull/128509 ___ cfe-commits mailing li

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-11 Thread Shilei Tian via cfe-commits
shiltian wrote: I'm okay with this change, but did you run a PSDB or even a full testing cycle? https://github.com/llvm/llvm-project/pull/128509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-28 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh updated https://github.com/llvm/llvm-project/pull/128509 >From e580bbe66a5d65e90051cb0906b87478341696e6 Mon Sep 17 00:00:00 2001 From: pvanhout Date: Mon, 24 Feb 2025 14:21:49 +0100 Subject: [PATCH 1/4] [clang][AMDGPU] Enable module splitting by default The default

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-28 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh updated https://github.com/llvm/llvm-project/pull/128509 >From cae772441c0d87a017f5cc2cb0b9c970c6b7fcde Mon Sep 17 00:00:00 2001 From: pvanhout Date: Mon, 24 Feb 2025 14:21:49 +0100 Subject: [PATCH 1/4] [clang][AMDGPU] Enable module splitting by default The default

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-26 Thread Pierre van Houtryve via cfe-commits
@@ -708,6 +712,34 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D, options::OPT_m_amdgpu_Features_Group); } +static unsigned GetFullLTOPartitions(const Driver &D, const ArgList &Args) { + const Arg *A = Args.getLastArg(options::OPT_flto_par

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-25 Thread Shilei Tian via cfe-commits
@@ -708,6 +712,34 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D, options::OPT_m_amdgpu_Features_Group); } +static unsigned GetFullLTOPartitions(const Driver &D, const ArgList &Args) { + const Arg *A = Args.getLastArg(options::OPT_flto_par

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-25 Thread Shilei Tian via cfe-commits
@@ -708,6 +712,34 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D, options::OPT_m_amdgpu_Features_Group); } +static unsigned GetFullLTOPartitions(const Driver &D, const ArgList &Args) { + const Arg *A = Args.getLastArg(options::OPT_flto_par

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-25 Thread Shilei Tian via cfe-commits
@@ -708,6 +712,34 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D, options::OPT_m_amdgpu_Features_Group); } +static unsigned GetFullLTOPartitions(const Driver &D, const ArgList &Args) { shiltian wrote: ```suggestion static

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-25 Thread Shilei Tian via cfe-commits
@@ -7417,7 +7419,7 @@ def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfie def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">, HelpText<"Turn off Type Based Alias Analysis">, MarshallingInfoFlag>; -defm pointer_tbaa: BoolOption<"", "pointer-

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-25 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh updated https://github.com/llvm/llvm-project/pull/128509 >From cae772441c0d87a017f5cc2cb0b9c970c6b7fcde Mon Sep 17 00:00:00 2001 From: pvanhout Date: Mon, 24 Feb 2025 14:21:49 +0100 Subject: [PATCH 1/3] [clang][AMDGPU] Enable module splitting by default The default

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-25 Thread Juan Manuel Martinez CaamaƱo via cfe-commits
@@ -708,6 +712,34 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D, options::OPT_m_amdgpu_Features_Group); } +static unsigned GetFullLTOPartitions(const Driver &D, const ArgList &Args) { + const Arg *A = Args.getLastArg(options::OPT_flto_par

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-24 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh updated https://github.com/llvm/llvm-project/pull/128509 >From cae772441c0d87a017f5cc2cb0b9c970c6b7fcde Mon Sep 17 00:00:00 2001 From: pvanhout Date: Mon, 24 Feb 2025 14:21:49 +0100 Subject: [PATCH 1/2] [clang][AMDGPU] Enable module splitting by default The default

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-24 Thread Matt Arsenault via cfe-commits
@@ -708,6 +712,34 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D, options::OPT_m_amdgpu_Features_Group); } +static unsigned GetFullLTOPartitions(const Driver &D, const ArgList &Args) { + const Arg *A = Args.getLastArg(options::OPT_flto_par

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Pierre van Houtryve (Pierre-vh) Changes The default number of partitions is the number of cores on the machine with a cap at 16, as going above 16 is unlikely to be usef

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-24 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh created https://github.com/llvm/llvm-project/pull/128509 The default number of partitions is the number of cores on the machine with a cap at 16, as going above 16 is unlikely to be useful in the common case. Adds a flto-partitions option to override the number of