LLVM and SPIRV-LLVM-Translator pulldown (WW28 2026)#22592
Conversation
…, again (#205309) Reverts part of #205268
These strings are needed for MIR textual representation: If one is missing it doesn't work to do "-stop-before=XXX and then -start-before=XXX".
…dedicated SSAFOptions" (#205312) Third attempt of #204686 Previous attempt was: #204798 This was last reverted in #205279 This class will help keeping SSAF options apart from generic FrontendOptions. It is inspired by AnalyzerOptions. This way all of these SSAF (and future) options will be at a centralized place. In preparation of rdar://179151023 --- The previous attempt had issues on Windows with `/permissive` configs. The issue was that `GENERATE_OPTION_WITH_MARSHALLING` had a generic lambda capture and that does not constitute as an ODR-use of the captured name - because that name was only used in an unevaluated context. This meant that MSVC refused to find the function parameter. My speculative solution is to follow the established pattern of passing a pointer to the Opts structure instead of passing it directly as a reference - similar to how `AnalyzerOptions` are passed around that macro.
…#205316) #204303 removed this include while converting `unordered_map` uses to `DenseMap`, but `loadDataFiles` still uses `unordered_multimap`. See https://ci.swift.org/job/llvm.org/job/clang-stage2-Rthinlto/job/main/360/ ``` [2026-06-23T05:46:26.519Z] /Users/ec2-user/jenkins/workspace/m.org_clang-stage2-Rthinlto_main/llvm-project/llvm/utils/UnicodeData/UnicodeNameMappingGenerator.cpp:34:13: error: missing '#include <unordered_map>'; 'unordered_multimap' must be declared before it is used [2026-06-23T05:46:26.519Z] 34 | static std::unordered_multimap<char32_t, std::string> [2026-06-23T05:46:26.519Z] | ^ ```
Optimized binaries from subsequent llvm-bolt runs may sometimes differ due to the unordered set (SmallPtrSet), even if the input binary and parameters are the same. Usage of SetVector guarantees a deterministic sequence of binary functions while keeping each function as a single instance. Below you can see two different main functions before the fix after two llvm-bolt runs (same input binaries, same arguments). ``` 0000000000210400 <main>: 210400: 10000140 adr x0, 0x210428 <main+0x28> 210404: f9400000 ldr x0, [x0] 210408: 10000140 adr x0, 0x210430 <main+0x30> 21040c: f9400000 ldr x0, [x0] 210410: 10000180 adr x0, 0x210440 <main+0x40> 210414: f9400000 ldr x0, [x0] 210418: 10000180 adr x0, 0x210448 <main+0x48> 21041c: f9400000 ldr x0, [x0] 210420: d65f03c0 ret 210424: d503201f nop 210428: 00000010 udf #0x10 21042c: 00000000 udf #0x0 210430: 00000020 udf #0x20 210434: 00000000 udf #0x0 210438: d503201f nop 21043c: d503201f nop 210440: 00000030 udf #0x30 210444: 00000000 udf #0x0 210448: 00000040 udf #0x40 21044c: 00000000 udf #0x0 210450: d503201f nop 210454: d503201f nop 0000000000210400 <main>: 210400: 100001c0 adr x0, 0x210438 <main+0x38> 210404: f9400000 ldr x0, [x0] 210408: 100001c0 adr x0, 0x210440 <main+0x40> 21040c: f9400000 ldr x0, [x0] 210410: 100000c0 adr x0, 0x210428 <main+0x28> 210414: f9400000 ldr x0, [x0] 210418: 100000c0 adr x0, 0x210430 <main+0x30> 21041c: f9400000 ldr x0, [x0] 210420: d65f03c0 ret 210424: d503201f nop 210428: 00000030 udf #0x30 21042c: 00000000 udf #0x0 210430: 00000040 udf #0x40 210434: 00000000 udf #0x0 210438: 00000010 udf #0x10 21043c: 00000000 udf #0x0 210440: 00000020 udf #0x20 210444: 00000000 udf #0x0 210448: d503201f nop 21044c: d503201f nop ```
…205086) This patch updates the outdated CMU wiki link in the clang-tidy documentation. The old link currently returns a `301 Moved Permanently` redirecting to the new GitHub Pages location. This patch updates the source file to point directly to the new destination to prevent future link rot. Closes #200277
…02365) The readability-redundant-parentheses check emitted fix-its that simply removed both parentheses. Tools that apply those fix-its directly could join adjacent tokens and produce invalid code, e.g. `return(0)` becoming `return0`. Replace the opening parenthesis with a space when removing it would merge identifier characters across the removed token. AI Usage: Test assisted by Codex. Closes llvm/llvm-project#185108
…ce.v8i32 call (#205310) Matches middle-end IR produced from the tests' C++ source since #199872
Add some handling of register pressure by scheduling an SU "low" if it closes a live range (under certain conditions). As this is checked before latency reduction, the "data-sequnces" check that was used to selectively enable latency reduction can now be removed. This gives good improvements on several benchmarks and is also a simplification of the SystemZPreRASchedStrategy.
…2257) Enable constexpr evaluation for `_mm_mpsadbw_epu8` and `_mm256_mpsadbw_epu8` (`__builtin_ia32_mpsadbw128`/`mpsadbw256`). Fixes #157522.
The AMDGPU prefix is redundant with the namespace. Co-Authored-By: Claude <noreply@anthropic.com>
…isMinusOne. (#204333)
…y need the feature flag. (#204199) Tests that use bfloat purely as an opaque datatype should not use instructions that require the bf16 feature.
Follow up to: - swiftlang/swift-docker#566 - swiftlang/swift-docker#565 It's no longer necessary to install packaging at runtime and the new image will use `BuildTools`.
Rewrites AllocActionTest.cpp's integration tests (RunBasicAction, RunFinalize*) to drive AllocActionFunction::handle with a small local IntPtrDeserializer / IdentitySerializer pair instead of going through SPS, and moves the existing SPS-using AllocAction tests into SPSAllocActionTest.cpp. Also adds two new SPS tests covering previously-uncovered paths: - RunActionWithSPSArgsAndWFBReturn — SPS argument deserialization plus AllocActionSPSSerializer's identity (WrapperFunctionBuffer) overload. - RunActionWithUndecodableArgs — the deserialization-failure path in AllocActionFunction::handle. After the split, an AllocActionTest failure indicates problems with the AllocAction machinery, and an SPSAllocActionTest failure without a corresponding AllocActionTest failure indicates an SPS encoding / decoding issue for AllocAction.
CONFLICT (content): Merge conflict in clang/include/clang/Driver/Driver.h CONFLICT (content): Merge conflict in clang/lib/Driver/Compilation.cpp CONFLICT (content): Merge conflict in clang/lib/Driver/Driver.cpp CONFLICT (content): Merge conflict in clang/lib/Driver/ToolChains/Clang.cpp CONFLICT (content): Merge conflict in clang/lib/Driver/ToolChains/HIPAMD.cpp CONFLICT (content): Merge conflict in clang/lib/Driver/ToolChains/SYCL.cpp
The new documentation mirrors the existing docs for annotate_type.
The `isStrictSubset` `ArrayRef<T>` template has no callers, so it never instantiates and trips `-Wunused-template`. The `VariantMatchInfo` overload does the work that's actually used, and `isSubset` stays untouched. Removing the dead template. NFC. Part of #202945.
This test launches a thread and then waits for a signal from the
launched thread. Below is one possible interleaving, where the
`pthread_cond_signal` (2) wins the race and becomes a no-op while (3) is
locking until the test times out.
```
void *
suspend_func (void *unused) {
[...]
// 2. Created thread reaches this and signals.
pthread_cond_signal(&signal_cond);
[...]
}
int main() {
pthread_mutex_lock(&signal_mutex);
// 1. Thread is created
pthread_create(&suspend_thread, NULL, suspend_func, NULL);
// Enable this to make race reliable:
// sleep(1);
// 3. We start waiting on signal_cond, but 2. already executed.
pthread_cond_wait(&signal_cond, &signal_mutex);
```
This patch guards (2) with signal_mutex so it can only be executed after
pthread_cond_wait unlocks signal_mutex.
The crash was caused by using `getOperandBundle` for an assume, which requires that the operand bundles are unique. This isn't guaranteed by assume bundles. This patch adds `hasOperandBundle` instead, which doesn't have the same constraint. Original message: This should make assumes a bit more efficient, since it removes a few instructions. This should also help with optimizations that are limited in how many instructions they step through. This reverts commit 3f0ef1e.
…(#205182) Summary: This option controls the logical path of the installed libraries. The runtimes obften reach into libraries, or want to install to the same location as the main build. Previously you had to set this per-runtime, but we should likely forward it by default. Fixes: llvm/llvm-project#159762
Summary: There is no reason that `convergent` should be a generic attributes but not `noconvergent`.
…(#205170) Summary: Currently, archives offer three approaches. 1. `--archive` which takes an archive and puts all the output in a new archive 2. No filename, which outputs based on the member names 3. Filename, which just matches everything. This has a gap for when people wnat a single file without relying on implicit naming that dumps all the contents to the CWD. This PR adds `member` which lets you specify the member names as you would get from `ar t libfoo.a` for this.
Add a AArch64 codegen flag to make llvm.aarch64.set.fpmr avoid writing FPMR when it already contains the requested value. By default, llvm.aarch64.set.fpmr continues to lower directly to an MSR FPMR instruction. With -aarch64-conditional-fpmr-write, the backend lowers the intrinsic to an MRS/MSR conditional branch sequence. This is based on the initial implementation from: llvm/llvm-project#114248 However this PR keeps the conditional FPMR write sequence behind a codegen flag. One reason to change the codegen lowering is because GCC emits the conditional branch sequence unconditionally. LLVM preserves the existing direct MSR lowering by default.
… Extractors" (#205334) The original version of this was reverted part of #205279 because I didn't know if this or the other patch caused the Windows build failures. It turns out this patch is fine. I'm relating this now. --- Now that we have SSAFOptions, it would make it a lot more ergonomic if it was accessible from builders and extractors. This PR does exactly that. Part of rdar://179151023 Co-authored-by: Jan Korous <jkorous@apple.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
For now just contains ORC_RT_DEPAREN, a macro for stripping parentheses from its argument. This will be used in an upcoming commit.
) TranslateOffloadTargetArgs had a broad exception for amdgcn OpenMP that passed all -m_Group args to the device DAL. This silently claimed flags like -mxnack/-mno-sramecc, suppressing the expected "unused argument" warning tested by amdgpu-xnack-sramecc-flags.c. The original intent was only to forward -mcpu to the device toolchain; narrow the condition accordingly. Fixes Driver/amdgpu-xnack-sramecc-flags.c CMPLRLLVM-76233 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit a58d5c9)
…size (#22431) Upstream commit 6794e31 added a verifier check requiring reqd_work_group_size to have exactly three operands. Pad the 1D and 2D test metadata nodes to comply; work_group_num_dim still limits which dimensions are emitted so behavior is unchanged. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 665825d)
…ernels (#22453) SYCL kernels generated from C++ templates use weak_odr linkage since identical instantiations across TUs are ODR-equivalent. Two early exits in surveyFunction fired before the SYCL kernel exception was reached: !hasLocalLinkage() and !isDefinitionExact() (the latter introduced by a079288 for the noipa attribute). Move FuncIsSyclKernel computation to the top of surveyFunction and guard both checks with !FuncIsSyclKernel. The weak_odr ODR guarantee makes bypassing isDefinitionExact() safe. Revert wrong fix 0c0065b Fixes LLVM::Transforms/DeadArgElim/sycl-kernels.ll CMPLRLLVM-76303 --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Yury Plyakhin <yury.plyakhin@intel.com> (cherry picked from commit 2424c16)
89905ff added nofree to below tests: - check_device_code/vector/bf16_builtins_new_vec.cpp - check_device_code/vector/bf16_builtins_old_vec.cpp - check_device_code/vector/convert_bfloat_new_vec.cpp - check_device_code/vector/convert_bfloat_old_vec.cpp - check_device_code/vector/math_ops_new_vec.cpp - check_device_code/vector/math_ops_old_vec.cpp CMPLRLLVM-76303
|
@intel/llvm-reviewers-runtime please review 9f61b69 |
Commit 8527438 restricted the bundler's short/3-component triple form to SPIR-V and NVPTX targets, so NativeCPU fell back to FOUR_IDENT normalization and got embedded as 'native_cpu-unknown-unknown-unknown'. This no longer matched the driver's expected 'native_cpu' triple in checkForOffloadMismatch, causing linked binaries to fail with: error: linked binaries do not contain expected 'native_cpu' target; found targets: 'native_cpu-unknown-unknown-unknown' Add isNativeCPU() to the exemption check so NativeCPU keeps the short triple form like SPIR-V/NVPTX. Fix failing e2e tests in CI: SYCL :: Basic/multisource.cpp SYCL :: KernelAndProgram/kernel-bundle-across-tus.cpp SYCL :: OptionalKernelFeatures/sycl-external-with-optional-features.cpp SYCL :: Regression/DAE-separate-compile.cpp SYCL :: SeparateCompile/same-kernel.cpp SYCL :: SeparateCompile/sycl-external-within-staticlib.cpp SYCL :: SeparateCompile/sycl-external.cpp Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…oad driver (#22569) f8cb6be switched OffloadPackager::ConstructJob to embed the image triple via ComputeEffectiveClangTriple(), which on Windows appends the detected MSVC toolset version (e.g. x86_64-pc-windows-msvc19.29.30159). OffloadPackagerExtract::ConstructJob still queried with the unversioned getTripleString(), so llvm-offload-binary's exact triple match failed on Windows, extraction silently produced an empty file, and clang later rejected the resulting .pchi as too small to contain PCH magic. Use ComputeEffectiveClangTriple() on the extract side too, matching the packaging side. Fix SYCL basic_tests/pch.cpp on Windows in CMPLRLLVM-76729. --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> (cherry picked from commit a591f6d) The cherry-pick fixes NewOffloadDriver/preprocess_file.cpp build on Windows.
parallel-hashmap uses std::allocator::pointer which is deprecated in C++17+ and causes build failures on macOS when -Werror is enabled. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
||
| # Suppress deprecation warnings from parallel-hashmap on macOS | ||
| # parallel-hashmap uses std::allocator::pointer which is deprecated in C++17+ | ||
| if(APPLE) |
There was a problem hiding this comment.
I'm going to make a PR cherry picking this patch soon, we need it before the pulldown, we need a couple other small changes in addition to this for CI tho, stay tuned
|
All commits below are reviewed already. IMHO they don't need additional reviews:
All commits were already reviewed. There is a PR id in the commit title.
#22446 PR created and @intel/dpcpp-cfe-reviewers notified. Considering there were feedback in that PR, I think we can consider this change as approved.
This is a commit from llorg. It was reviewed already when it was committed to llorg. |
|
This is ready for review. @intel/llvm-reviewers-runtime (2 commits)
@intel/dpcpp-clang-driver-reviewers (2 commits)
@intel/dpcpp-nativecpu-reviewers (1 commits) @intel/dpcpp-tools-reviewers (1 commits) |
You are right. I am in the middle of improving the skills. :), updated. |
I'm not sure what I should review. Not sure how it is related to dpcpp-tools and also why it was reverted. |
This is based on the CODEOWNERs -- all common llvm files are @intel/dpcpp-tools-reviewers. This is because we are still using the pass, there is a JIRA 76567 to follow up to remove it later internally. |
Providing this context (that we still use the pass and reference to jira CMPLRLLVM-76567 would help to review. Without context, I had no idea, why we are reverting the removal of the pass. |
Done. [NFC] Remove accidentally added file . Once this is merged, the file will be removed from downstream as well. |
|
Thanks @mdtoguchi ! |
|
@intel/llvm-gatekeepers This is ready for merge. Please help to issue |
|
/merge |
|
Mon 13 Jul 2026 02:17:57 PM UTC --- Start to merge the commit into sycl branch. It will take several minutes. |
|
Mon 13 Jul 2026 02:33:02 PM UTC --- Merge the branch in this PR to base automatically. Will close the PR later. |
LLVM: llvm/llvm-project@f4a8eb0
SPIRV-LLVM-Translator: KhronosGroup/SPIRV-LLVM-Translator@a2a2774