Thanks to visit codestin.com
Credit goes to github.com

Skip to content

merge main into amd-staging#2794

Open
ronlieb wants to merge 35 commits into
amd-stagingfrom
amd/merge/upstream_merge_20260604225017
Open

merge main into amd-staging#2794
ronlieb wants to merge 35 commits into
amd-stagingfrom
amd/merge/upstream_merge_20260604225017

Conversation

@ronlieb
Copy link
Copy Markdown
Collaborator

@ronlieb ronlieb commented Jun 5, 2026

No description provided.

adurang and others added 30 commits June 4, 2026 21:42
Introduce a new L0EventTy type used to implement most of the Event APIs
of PluginInterface (all but getEventElapsedTimeImpl).

---------

Co-authored-by: Kevin Sala Penades <[email protected]>
…lvm#201388)

It seems like for BUILD_SHARED builds of the toolchain on Windows,
specifically aarch64-windows-gnu hosts, the use of the `thread_local`
variables in Representation.cpp causes an issue at link time due to
non-explicit export. Instead, just wrap them in an accessor function,
which should solve the issue in a cross platform way.

Fixes llvm#200915
…vm#201635)

In preparation for PR llvm#201370 - the goal is to decouple CFI from _how_
ThinLTO computes its GUIDs, and enable PR llvm#184065 (for this
[RFC](https://discourse.llvm.org/t/rfc-keep-globalvalue-guids-stable/84801)).

This PR just changes APIs and the internal implementation of
CfiFunctionIndex, the subsequent one (201370) actually propagates GUIDs
through metadata. It's _almost_ NFC - the YAML format does change
though.
…cification (llvm#201403)

The PRIF Committee is pleased to announce the publication of the
Parallel Runtime Interface for Fortran (PRIF) Specification, Revision
0.8. The latest iteration of this specification represents the efforts
of a collaborative design process involving multiple individuals across
several institutions.

The document is available here: https://doi.org/10.25344/S4Z88F

The PRIF specification is governed by a formal PRIF Committee. For more
details, see: https://go.lbl.gov/prif-governance

The Committee vote to approve the technical content in this revision
began on 2026-04-30 and concluded successfully on 2026-05-18.

The 7-day committee comment period for cosmetic feedback began on
2026-05-21 and concluded on 2026-05-28 with no comments, and only minor
editorial changes by the Editor.

See the Change Log in Section 1 of the document for the list of changes
relative to the prior revision.
…Type (llvm#201664)

This fixes a regression introduced in llvm#186727, which was never released,
so there are no release notes.

Fixes llvm#200418
## Summary

The SYCL Support section in the release notes previously had a single
entry for the default SPIR-V target change. This PR adds driver-level
entries covering all notable SYCL changes landed upstream:

- `-fsycl`, `-fsycl-device-only`, `-fsycl-host-only` flag introduction
(#GH117268)
- C++17 default enforcement and sub-C++17 rejection (#GH194014)
- Runtime library rename from `libsycl.so` to `libLLVMSYCL.so` and
automatic runtime path / header include injection (#GH188770, #GH174877)
- Windows SYCL runtime library linking support with CRT management
(#GH194744)
- Fix for `-nolibsycl` being silently ignored and spurious spirv-link
  flags forwarded to `clang-sycl-linker` (#GH200252)

Addresses the review comment on llvm#200200 requesting that notable SYCL
driver and offload tool changes be documented alongside the front-end
changes. This PR covers only the Clang Driver changes.

---------

Co-authored-by: Nick Sarnie <[email protected]>
…#201673)

Add test showing narrowInterleaveGroups incorrectly using the flags from
the first member, even if other members do not have the same flags.
…vm#200308)

This updates the LLVM dialect to properly handle intrinsics with
metadata arguments.

The primary goal of this change is to support the constrained FP
intrinsics, but support for other intrinsics with metadata arguments
came along with the change.

I have not yet added the RoundingModeOpInterface and
FPExceptionBehaviorOpInterface to CallIntrinsicOp. I intend to do that
as a follow up change if this direction is accepted. I have also not yet
removed existing specialized operations that explicitly handle a subset
of the constrained intrinsics.

Assisted-by: Cursor / claude-opus-4.7
This allows copying the binary vs updating it in place
The existing pairwise common-factor fold in getAddExpr handles two
patterns:
  `W + X + (X * Y * Z)  -->  W + (X * ((Y*Z)+1))`
  `X + (A*B*C) + (A*D*E) --> X + (A*(B*C+D*E))`

Both fold exactly two terms sharing a common factor, then re-enter
getAddExpr() with the partially-simplified Ops. When n terms share a
common factor X, this requires n-1 re-entries through the full
getAddExpr normalization pipeline.

Replace this with a single-pass scan that collects all terms sharing the
common factor and folds them in one shot:
  `A1*X + A2*X + ... + An*X  -->  X * (A1 + A2 + ... + An)`

This reduces the number of top-level re-entries into getAddExpr() for
this fold from n-1 to 1, improving compile time for expressions with
many terms sharing a common factor.

Note that in some cases this change causes benign operand order
changes.
…#201455)

The C++26 constraint added to operator==(const expected& x, const T2& v)
by P3379R0 evaluates *x == v as part of constraint satisfaction. When
ADL on a comparison reaches this hidden friend through a type whose
associated namespaces include std::expected -- for example std::pair<T,
std::expected<U, V>> -- the constraint check ends up considering the
same overload again with the original type as T2, producing a
"satisfaction of constraint depends on itself" error.

Parameterize the expected operand with an extra template parameter
constrained to be the same type as the enclosing expected's value type.
This is observationally equivalent but makes template argument deduction
fail for non-expected operands before the constraint is evaluated, so
the recursion never starts.

Fixes llvm#160431
rdar://178226313

Assisted-by: Claude
llvm#201633)

The deprecation warning for wstring_convert::to_bytes fires from inside
the libc++ header, so users can't suppress it with their own diagnostic
pragmas around the call site. Wrap the definition with
_LIBCPP_SUPPRESS_DEPRECATED_PUSH/POP, mirroring what's already done for
the destructor and from_bytes just above.

Add a regression test under test/libcxx.

rdar://173319468

Assisted-by: Claude
Convert the two remaining top-level RST docs, index and
python_api_enums, to MyST Markdown. This is the final batch of an
incremental RST -> Markdown migration.

After this change, the only RST sources left under lldb/docs/ are
man/lldb.rst and man/lldb-server.rst, which conf.py intentionally keeps
as RST so the man-page builder can run without myst_parser installed
(this reduces dependencies for some llvm distributions).

Verified by building the docs on origin/main and on this branch with
identical sphinx flags and diffing both the warnings and the rendered
HTML. After file extension and line numbers are normalized, the warning
sets match exactly. index.html is byte-identical; python_api_enums.html
differs in a single line where CommonMark collapses two spaces after a
period to one.

The diff also surfaced two semantic regressions in the conversion, fixed
here:

- index.md and python_api_enums.md lost cross-reference behavior on
single-backtick refs to `lldb` and `SBHostOS.GetLLDBPath`. RST's default
role is `any`, so single backticks attempted xrefs; in MyST single
backticks are plain code spans. Converted to explicit `{any}`...``
syntax.

Context: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/

Assisted-by: Claude
…#201658)

Track unpromoted candidates explicitly when performing ICP during
MemProf
context disambiguation. Previously, the code assumed that the first N
candidates were always the ones promoted, which led to incorrect
metadata
on the fallback indirect call if a candidate was skipped (e.g. due to
missing definition or being illegal to promote).
…lvm#201682)

Update narrowInterleaveGroupOp to properly intersect flags for all wide
members, to make sure we only use the flags common across all combined
members.
…llvm#197978)

Run a small pre-pass at the start of convert-vector-to-xegpu that
rewrites every memref.alloca to address space 3, so allocations coming
out of bufferization carry the SLM attribute by the time the conversion
patterns run.
--filetype=asm is the default. Suggested by arsenm.
…les keep…" (llvm#201698)

Reverts llvm#200964

This patch breaks flang declare target on a common block
This fixes 01c00d1.

Co-authored-by: Google Bazel Bot <[email protected]>
These QUALCOMM vendor relocations mark 16-bit compressed and 32-bit
load/store instructions as candidates for relaxation from a QC_E_LI +
Load/Store sequence.

This change adds support for assembling instructions with these
relocations. These relocations are documented in
https://github.com/quic/riscv-elf-psabi-quic-extensions
…1702)

Reverts llvm#200968

This is causing some non-determinism in PCM files in the
`clang/test/Modules/rebuild.m` test.
…l linker (llvm#201215)

The default tag arm of AcceleratorRecordsSaver::save returned early when
a DIE was cloned into the artificial type unit, so class-static const
data members (DW_AT_const_value, no out-of-class definition) never got
an accelerator entry. As a result `target var A::int_val` in LLDB then
found nothing.

The HasLiveAddress / HasRanges guard already decides whether a DIE
carries enough information of its own to warrant a name record; the
output unit is just doing the routing. Drop the early return and thread
the TypeEntry through saveNameRecord / saveObjCNameRecord / saveObjC so
they emit into the type-unit accel storage when appropriate, the same
way saveTypeRecord and saveNamespaceRecord already do.
We already marked them as legal, but would crash.
This commit toggles the default linker in dsymutil from the classic
linker to the parallel linker. This means that we have parity between
the two implementations, at least for everything we have test coverage
for in LLVM and LLDB.

I expected we'll continue to uncover more differences in the future.
However I don't think that necessitates holding off on toggling the
default. By making the parallel linker the default, we get maximum
living on upstream, even if that audience is comparatively small.

Fixes llvm#195390
…er layout (llvm#201671)

fixes llvm#201668

A per-declaration `row_major`/`column_major` keyword on a cbuffer matrix
was being dropped when building the cbuffer layout, so the layout struct
and the buffer-layout copy fell back to the translation-unit
`-fmatrix-memory-layout=`

Needed to fix the desugar in two places:
* HLSLBufferLayoutBuilder::layOutMatrix took a `const ConstantMatrixType
*` and called ConvertTypeForMem(QualType(MT, 0)), discarding the sugar.
It now takes the sugared QualType.
* SemaHLSL's host-layout struct construction called
getUnqualifiedDesugaredType() on each field, erasing the orientation
attribute. A getHostLayoutFieldType() helper now keeps the sugared type
for constant matrices while desugaring everything else.
Introduced a new scriptedbuilder for libc build. It will enable
developers to conveniently reproduce the same build by our bot:
https://lab.llvm.org/buildbot/#/builders/10

Tested locally, tests passed.
Called `-mzilsd-word-align` and `-mzilsd-strict-align`. These interact
with scalar/strict alignment, in hopefully a reasonable way.

They cause errors on rv64, where zilsd is not available.
`__xindex_` is only ever used from the dylib from a single function. We
can simplify the code a bit by making the variable function-local and
avoiding exposing it to the ABI at all. This also fixes a TODO about
whether it's safe to use `atomic` with the GCC ABI: yes, since it's not
actually part of our ABI.
…ect (llvm#201324)

This will make it possible to diagnose these situations independently.
This isn't perfect, but will be improved gradually in the future.
unterumarmung and others added 5 commits June 4, 2026 22:40
Fix llvm#201615.

Fix the issue that non atomic operations race in waiting queue, which
causes missed futex wakeup signals.

Confirmed by TSAN:

```
==================
WARNING: ThreadSanitizer: data race (pid=388518)
  Write of size 4 at 0x7ffd21cf98e4 by thread T23:
    #0 __llvm_libc_23_0_0_git::RawRwLock::notify_pending_threads() ./libc/src/__support/threads/raw_rwlock.h:443:44
    #1 __llvm_libc_23_0_0_git::RawRwLock::unlock() ./libc/src/__support/threads/raw_rwlock.h:520:5
    #2 randomized_thread_operation(SharedData*) ./libc/test/integration/src/__support/threads/tsan_full_rwlock.cpp:104:18
    #3 thread_runner(void*) ./libc/test/integration/src/__support/threads/tsan_full_rwlock.cpp:148:5

  Previous atomic read of size 4 at 0x7ffd21cf98e4 by thread T4:
    #0 __llvm_libc_23_0_0_git::cpp::Atomic<unsigned int>::load(...) ./libc/src/__support/CPP/atomic.h:115:5
    #1 __llvm_libc_23_0_0_git::Futex::wait(...) ./libc/src/__support/threads/linux/futex_utils.h:43:17
    #2 __llvm_libc_23_0_0_git::cpp::expected<int, int> __llvm_libc_23_0_0_git::rwlock::WaitingQueue::wait<Role::Reader>(...) ./libc/src/__support/threads/raw_rwlock.h:101:35
    #3 __llvm_libc_23_0_0_git::rwlock::LockResult __llvm_libc_23_0_0_git::RawRwLock::lock_slow<Role::Reader>(...) ./libc/src/__support/threads/raw_rwlock.h:402:34
    #4 __llvm_libc_23_0_0_git::RawRwLock::read_lock(...) ./libc/src/__support/threads/raw_rwlock.h:485:12
    #5 randomized_thread_operation(SharedData*) ./libc/test/integration/src/__support/threads/tsan_full_rwlock.cpp:79:16
    #6 thread_runner(void*) ./libc/test/integration/src/__support/threads/tsan_full_rwlock.cpp:148:5

  Thread T23 (tid=388553, running) created by main thread at:
    #0 pthread_create ...
    #1 main ./libc/test/integration/src/__support/threads/tsan_full_rwlock.cpp:166:5

  Thread T4 (tid=388533, running) created by main thread at:
    #0 pthread_create ...
    #1 main ./libc/test/integration/src/__support/threads/tsan_full_rwlock.cpp:166:5

SUMMARY: ThreadSanitizer: data race ./libc/src/__support/threads/raw_rwlock.h:443:44 in __llvm_libc_23_0_0_git::RawRwLock::notify_pending_threads()
==================
```

AI wrote the detection script. Manually fixed.
…m#200514)

This fixes a crash in Clang when the `experimental-mv` ABI is used on
WebAssembly targets in conjunction with complex numbers as arguments.
There's no strict definition for what the multivalue ABI is at this
time, so the main goal is to just not crash for now.

Closes llvm#70402
Closes llvm#153567
…d through void* in MemoryUnsafeCastChecker (llvm#200294)

Adds a matcher for static_cast<Derived*>(static_cast<void*>(base)),
which previously evaded detection because the outer cast's immediate
source expression is void*, not Base*.

rdar://173770143

---------

Co-authored-by: Balázs Benics <[email protected]>
@ronlieb ronlieb requested review from a team, dpalermo, kirthana14m and skganesan008 June 5, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.