[qt/clang/llvm-project]: Summary of bulk changes made

KDE Git Services - Bulk Change <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git repository change summary for qt/clang/llvm-project
Pushed by mirror-service into branch 'upstream/users/momchil-velikov/gvn-unused-helper'.
Changed from 67ad2e492b9f7a5ead697bfd8ec1e21aef2973cf to 50f7af6ab4be6869d36693001c1d5fadb25f8424
Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository.

This change contains the following new commits:

Git commit 4bd1a447e136e60ea441370ac5d7b898aa4efab0 by GitHub (on behalf of Pavel Labath) on 21/07/2026 at 05:18..
[libc] Make hermetic test syscall deps linux-only (#210715)

They are only used on linux, so this matches that.

They are also only used in full build mode, but hermetic tests only work
in full build mode, so we don't need to check that here. The darwin
check is a noop as (AAIU) we don't support full_build on darwin, but
I've kept it for symmetry.
https://invent.kde.org/qt/clang/llvm-project/-/commit/4bd1a447e136e60ea441370ac5d7b898aa4efab0

Git commit 375231d8ea9b4f5a3a71f4afb3d76ba6e1dcefc5 by GitHub (on behalf of Pavel Labath) on 21/07/2026 at 05:19..
[libc] Add struct group_req, struct group_source_req, and related socket options (#210029)

Add definitions for struct group_req and struct group_source_req in
llvm-libc-types and wire them into <netinet/in.h>.

Also define the multicast socket options using these structs:
- MCAST_JOIN_GROUP
- MCAST_LEAVE_GROUP
- MCAST_BLOCK_SOURCE
- MCAST_UNBLOCK_SOURCE
- MCAST_JOIN_SOURCE_GROUP
- MCAST_LEAVE_SOURCE_GROUP

Add layout assertions for struct group_req and struct group_source_req
to the netinet/in.h unit test.

Assisted by Gemini.
https://invent.kde.org/qt/clang/llvm-project/-/commit/375231d8ea9b4f5a3a71f4afb3d76ba6e1dcefc5

Git commit ea52aa03750fd51857f47b6a901edc0b283a7aec by GitHub (on behalf of Ken Matsui) on 21/07/2026 at 05:34..
[clang] Use key-value initialization for LangASMap (NFCI) (#210259)

The original implementation requires each target to list a value for
every LangAS in exact enum order. This forces targets to specify
mappings for unrelated address spaces and makes it easy to introduce
ordering bugs, such as the one fixed in
4479f3397f827291c51698fbaa685b1a9493467a.

Address this by introducing a class that supports order-independent
key-value initialization and defaults unspecified entries to 0.
https://invent.kde.org/qt/clang/llvm-project/-/commit/ea52aa03750fd51857f47b6a901edc0b283a7aec

Git commit 0b16957f41f96f14aa014f119e4180538bcb4f80 by GitHub (on behalf of Jim Lin) on 21/07/2026 at 05:46..
[RISCV] Don't transfer (select c, t, f) to Zicond when optimizing for size (#163501)

The Zicond form of (select c, t, f), (or (czero_eqz t, c),
(czero_nez f, c)), has no compressed encodings and is always 12 bytes.
The branch form (branch + mv) is at most 8 bytes, and with the C
extension
4 bytes when the branch compresses (c.mv always does) or 6 bytes when it
does not; it shrinks further when a condition is shared across selects.
Since it is never larger by byte count, skip the Zicond transform under
optsize via !DAG.shouldOptForSize().

Fixes https://github.com/llvm/llvm-project/issues/158633.
https://invent.kde.org/qt/clang/llvm-project/-/commit/0b16957f41f96f14aa014f119e4180538bcb4f80

Git commit 921f4da4a05f93391937ccc337aa448b3d8de539 by GitHub (on behalf of Madhur Amilkanthwar) on 21/07/2026 at 06:00..
[SLP][Modularisation][NFC] Extract free cost helpers into SLPCostAnalysis (#210278)

Move the BoUpSLP-independent cost helpers out of SLPVectorizer.cpp into
SLPVectorizer/SLPCostAnalysis.{h,cpp} (namespace llvm::slpvectorizer).

Moved:
  * getShuffleCost
  * getGEPCosts

RFC: https://discourse.llvm.org/t/modularizing-slpvectorizer-cpp/90922
https://invent.kde.org/qt/clang/llvm-project/-/commit/921f4da4a05f93391937ccc337aa448b3d8de539

Git commit 8f48e1980f9da4e4d859c1c2713561195d043454 by GitHub (on behalf of qyingwu) on 21/07/2026 at 06:12..
[mlir][LLVMIR] Add export coverage for retained local variables (#209911)

Adds export coverage for a retained local variable case where MLIR may
contain separate `DILocalVariableAttr`s for the same source-level
variable.

A local variable can appear both in a `DISubprogram`'s `retainedNodes`
and in a debug intrinsic such as `dbg.value` or `dbg.declare`. During
import, the `retainedNodes` path may see the variable while the
containing subprogram is represented by a self-recursive placeholder,
while the debug intrinsic path later sees the finalized subprogram. This
can produce two MLIR local variable attrs with different subprogram
scopes.

The exported LLVM IR debug metadata is still canonical for this case:
both the debug intrinsic and the subprogram `retainedNodes` reference
the same `DILocalVariable` metadata node. This patch adds regression
coverage for that export behavior without extending the recursive
debug-info machinery.
https://invent.kde.org/qt/clang/llvm-project/-/commit/8f48e1980f9da4e4d859c1c2713561195d043454

Git commit 9aebd4b405d7299337d4561de8d35c579ab5d88b by GitHub (on behalf of Luke Lau) on 21/07/2026 at 06:33..
[RISCV] Run EarlyMachineLICM before VLOptimizer to hoist constant splats (#210028)

RISCVVLOptimizer runs before the machine SSA optimization passes. This
includes EarlyMachineLICM, which causes previously loop invariant
vmv.v.i/vmv.v.x/vfmv.v.f splats to use a loop variant VL defined by a
PseudoVSETVLI. This prevents splats from being hoisted out:
https://godbolt.org/z/Wf49roo7s

This fixes it by adding another pass of EarlyMachineLICM before
RISCVVLOptimizer.

As measured on llvm-test-suite w/ `-march=rva23u64 -O3` this increases
the number of vector splat instructions hoisted by MachineLICM by 4.4x,
from 2140 to 9327.

Compile time wise, the number of instructions executed increases geomean
+0.2% on CTMark for -O3. -O0 builds are unaffected.

Two other approaches were considered:

- Use MachineLoopInfo in RISCVVLOptimizer to avoid changing the VL of
any loop invariant pseudos. But that results in more vsetvli toggles,
and still involves running the same analysis that EarlyMachineLICM
depends on anyway
- Hoist loop invariant pseudos ourselves in RISCVVLOptimizer. But in
order to catch all cases that EarlyMachineLICM handles, we need to split
critical edges and modify the CFG (which would invalidate the CFG
analyses), and also hoist scalar non-pseudo instructions. In some cases
it also led to more spilling due to increased register pressure, which
EarlyMachineLICM has heuristics for avoiding.
https://invent.kde.org/qt/clang/llvm-project/-/commit/9aebd4b405d7299337d4561de8d35c579ab5d88b

Git commit e747c8b850d20add682ea25d0f8709129f158c09 by GitHub (on behalf of Henrik G. Olsson) on 21/07/2026 at 06:40..
[clang] Remove stale TransformTypeTraits.def entry from module map (#210878)

Commit 2a33792a2ec1 ("[clang][NFC] move traits to tablegen", #201491)
deleted clang/include/clang/Basic/TransformTypeTraits.def in favor of a
tablegen-generated clang/Basic/Traits.inc. The stale module map entry
broke module builds. Renaming it to "clang/Basic/Traits.inc" doesn't
seem to work, ('clang/Basic/Traits.inc' not found) but the build
succeeds with the entry dropped entirely.

Assisted-by: Claude Sonnet 5

rdar://182772346
https://invent.kde.org/qt/clang/llvm-project/-/commit/e747c8b850d20add682ea25d0f8709129f158c09

Git commit 4c8e5c3e8b462ebd664ac1ccd621005d9b365644 by GitHub (on behalf of Mayank) on 21/07/2026 at 06:57..
[TTI] Fix haveFastClmul to access inherited DL via thisT() (#210647)

haveFastClmul() called DL.getIndexType()/DL.getAllocaAddrSpace()
directly, relying on the `using TargetTransformInfoImplBase::DL;`
declaration in BasicTTIImplBase to bring the inherited DataLayout
reference into scope. Because DL is reached through a two-level
dependent base chain (BasicTTIImplBase<T> ->
TargetTransformInfoImplCRTPBase<T>-> TargetTransformInfoImplBase), some
compilers (observed with GCC 8.5.0) mis-resolve the member access and
reject the code with a misleading diagnostic naming
TargetTransformInfoImplBase rather than DataLayout.

Access DL via thisT()->DL instead, matching the pattern already used
elsewhere in this file (e.g. getABITypeAlign() call sites), which forces
lookup to be deferred to instantiation time and avoids the
compiler-version-dependent behavior.
https://invent.kde.org/qt/clang/llvm-project/-/commit/4c8e5c3e8b462ebd664ac1ccd621005d9b365644

Git commit 9a49fc244be7400e550b2c014e6d370b586dc854 by GitHub (on behalf of Fangrui Song) on 21/07/2026 at 07:01..
[LoopInfo] Replace raw loop-container accessors with semantic operations (#210653)

getBlocksVector, mutable getBlocksSet, getSubLoopsVector, and
getTopLevelLoopsVector expose LoopInfo's internal containers, so every
caller open-codes loop-nest surgery, keeps the block vector and set in
sync by hand, and freezes the representation. Replace them with two
LoopInfoBase operations:

* removeBlocksIf(LoopT &, Pred): drop matching blocks from a loop.
* takeChildrenIf(LoopT *Parent, Pred): detach and return matching
  children, clearing their parent; a null Parent means the top level.

Both preserve the relative order of what remains. Mutation inside
LoopInfoBase also lets the analysis repair derived state once per edit
and finish a multi-step edit before any query observes it, which an
accessor returning a container cannot.

For the same reason, move hasNoExitBlocks, getExitEdges, and
getUniqueLatchExitBlock onto LoopInfoBase.

Two behavior changes: SimpleLoopUnswitch's deleteDeadBlocksFromLoop runs
its per-child deletion callbacks while the forest is still consistent,
before detaching and destroying dead children; FixIrreducible's
reconnectChildLoops keeps children in their original order rather than
std::partition's.

Aided by Claude Fable 5
https://invent.kde.org/qt/clang/llvm-project/-/commit/9a49fc244be7400e550b2c014e6d370b586dc854

Git commit 13822d0b1808b759dd4f4d237ea347729f93b3ed by GitHub (on behalf of Fabian Ritter) on 21/07/2026 at 07:17..
[RFC][LangRef] Specify that the accessed bytes of concurrent atomics must be either disjoint or the same (#204329)

So far, the LangRef hasn't been clear on the semantics of partially overlapping
concurrent atomics in LLVM IR (specifically: a set of accesses marked as
`atomic` that would be in a data race if they weren't `atomic` and not all of
them access the exact same set of bytes).

What loads read is defined in terms of individual bytes, but the memory
ordering constraints are formulated closely to the C/C++ (and Java for
`unordered`) memory model, where partially overlapping atomics are not
possible. It's not obvious how concepts like C/C++'s per-location total
modification order for `monotonic` accesses map to accesses that can partially
overlap. While C/C++ relies on the modification order to ensure that atomics
cannot tear (i.e., atomic reads return bytes from two or more atomic writes),
our IR semantics (as written) currently does not guarantee this in the presence
of partially overlapping accesses.

This PR proposes a solution to this problem: It specifies that concurrent
overlapping atomics must access the exact same set of bytes to act atomically.
If they don't, they form a data race (i.e., participating loads read `undef`
for affected bytes) and the atomic ordering constaints do not apply. This empowers the rest of the specification to imply that
`monotonic` (or stronger) accesses do not tear. The PR also adds a constraint
to ensure non-tearing for `unordered` atomic accesses.

This solution implies that transformations that merge adjacent atomic
loads/stores into wider atomic loads/stores are generally incorrect.

Related RFC: https://discourse.llvm.org/t/rfc-semantics-of-partially-overlapping-atomic-accesses/91092
https://invent.kde.org/qt/clang/llvm-project/-/commit/13822d0b1808b759dd4f4d237ea347729f93b3ed

Git commit 9b5c0571afd6b2c1918db5585a05b9756ea19c28 by GitHub (on behalf of Madhur Amilkanthwar) on 21/07/2026 at 07:25..
Enforce single-operand form for llvm.loop.distribute metadata (#201077)

This patch implements Phase 1 of the
[RFC](https://discourse.llvm.org/t/rfc-enforce-single-operand-format-for-all-enable-metadata-nodes/90571)
"Enforce Single-Operand Format for All .enable Metadata Nodes". The
two-operand boolean form !{!"llvm.loop.distribute.enable", i1 0/1} is
replaced by a single-operand enable/disable pair:

  !{!"llvm.loop.distribute.enable"}    ; force distribution
  !{!"llvm.loop.distribute.disable"}   ; suppress distribution
https://invent.kde.org/qt/clang/llvm-project/-/commit/9b5c0571afd6b2c1918db5585a05b9756ea19c28

Git commit e3dfa82a46b6df7cdc92657b27e75470b74459cb by GitHub (on behalf of David Green) on 21/07/2026 at 07:47..
[AArch64] Update abs cost with scalar costs and CSSC. NFC (#210900)
https://invent.kde.org/qt/clang/llvm-project/-/commit/e3dfa82a46b6df7cdc92657b27e75470b74459cb

Git commit b7f642fdb262e2ed3c2209b9a10017084e1595ad by GitHub (on behalf of Pavel Labath) on 21/07/2026 at 07:47..
[ilbc] Revert recent changes to the hermetic tests (#210889)

PR #209999 (9e2e9b33e14808541c0470b92ade34bee6608bf6) "broke" the GPU
build by causing many/most tests to not run.

The follow-up in #210715 (4bd1a447e136e60ea441370ac5d7b898aa4efab0)
broke it for real
(https://lab.llvm.org/buildbot/#/builders/10/builds/32254) by causing
too many tests to run.

I think we just need to disable the extra tests, but I want to start out
by reverting both patches so that it's easier to compare the
before/after state in the next attempt.
https://invent.kde.org/qt/clang/llvm-project/-/commit/b7f642fdb262e2ed3c2209b9a10017084e1595ad

Git commit d80b9a5e358de107da3a58730c89e512daffd9a7 by GitHub (on behalf of Iurii Khosoi) on 21/07/2026 at 07:51..
[X86] MIR-level tests for bitcnt/bls/compress/expand false dependencies (#209879)

Followup to #207079. This replaces IR-level tests introduced in
c311e7b3d that were using inline assembler hack with MIR-level tests, as
suggested by @ganeshgit. Older test for bit counting instruction with
more complex functions is kept alongside a new one that tests affected
instructions in isolation.
https://invent.kde.org/qt/clang/llvm-project/-/commit/d80b9a5e358de107da3a58730c89e512daffd9a7

Git commit ca80eecf34d041e55b60e202bce1c606288ffa71 by GitHub (on behalf of David Spickett) on 21/07/2026 at 08:00..
[lldb][AArch64][Linux] Use memcpy when serialising data (#210710)

In few places we are reinterpreting raw bytes as typed data. This works
but is undefined behaviour if the address being used isn't at the same
alignment as the target type.

It likely has always been because we've got 4 and 8 byte types and 4 or
8 byte registers. However I prefer to use memcpy anyway to be safe.

m_sve_state is a single byte but for consistency I'm using memcpy for it
also.
https://invent.kde.org/qt/clang/llvm-project/-/commit/ca80eecf34d041e55b60e202bce1c606288ffa71

Git commit ba9d799b1bf2433bf960a08ff995497f5b6d2feb by GitHub (on behalf of David Spickett) on 21/07/2026 at 08:02..
[lldb][test] Add test for qSymbol handling when using an ELF (#200411)

qSymbol is sent to the debug server every time libraries are loaded. It
can respond to this with symbols it wants to know the value for. It's
rarely used so I expect that's why we had zero test coverage for it.

In this commit I'm adding a test case, derived from the bug being
reported in #200134. The mock debug server has a list of symbols to ask
for and records the results. After LLDB has connected we check with the
mock that it got all the answers it wanted. Right now, 2 of the symbols
don't have values, but should according to the author of the bug report.
One symbol is intentionally missing to check that LLDB handles that
situation properly, even when the others have been fixed.

While I was doing this I realised the documentaiton for an unknown
symbol response was wrong. You can cross check this with GDB's:
https://sourceware.org/gdb/current/onlinedocs/gdb.html/General-Query-Packets.html#General-Query-Packets

In theory we should test the MachO behaviour too. However I was not able
to create a MachO example that did not end up using a host AArch64 Linux
binary that it found via. PID, while also getting far enough to send
qSymbol. Every workaround broke one of those 2 things. ELF testing is
better than the nothing we currently have.

Assisted by: ChatGPT 5.5
https://invent.kde.org/qt/clang/llvm-project/-/commit/ba9d799b1bf2433bf960a08ff995497f5b6d2feb

Git commit 62e843ac959f2ad617f18bea20141d6c33913572 by GitHub (on behalf of Arseniy Obolenskiy) on 21/07/2026 at 08:09..
[AMDGPU] Reject illegal image atomic data widths in SelectionDAG (#210366)
https://invent.kde.org/qt/clang/llvm-project/-/commit/62e843ac959f2ad617f18bea20141d6c33913572

Git commit d13b8625eef0941f48b5af74e9fab953b6430eb2 by GitHub (on behalf of Yanzuo Liu) on 21/07/2026 at 08:09..
[clang][Parser] Warn when the body of expansion statement is not a compound statement (#209229)

<https://eel.is/c++draft/stmt.expand#nt:expansion-statement>:

_expansion-statement_:  
template for ( _init-statement<sub>opt</sub>_ _for-range-declaration_ :
_expansion-initializer_ ) _compound-statement_
https://invent.kde.org/qt/clang/llvm-project/-/commit/d13b8625eef0941f48b5af74e9fab953b6430eb2

Git commit 285a3cb74ef4cdc080cb264d44d1e3c9aa3a33be by GitHub (on behalf of Fangrui Song) on 21/07/2026 at 08:22..
[CycleInfo] Store entries in the block layout. NFC (#210866)

A reducible loop has a single entry (header), which flatten() places at
BlockLayout[IdxBegin], as its minimum-preorder block. A reducible loop
then needs no storage at all.

For the uncommon irreducible loop case, we append its full entry list
(header first) after the Euler tour, referenced by [EntryBegin,
EntryBegin+EntrySize), making `GenericCycleInfo::Cycle` (named only
because "loop" is occupied by LoopInfo) trivially destructible.
https://invent.kde.org/qt/clang/llvm-project/-/commit/285a3cb74ef4cdc080cb264d44d1e3c9aa3a33be

Git commit 0228facbd558a55e7db6646572d857d1b0cf9596 by GitHub (on behalf of Craig Topper) on 21/07/2026 at 08:25..
[RISCV][P-Ext] Add RISCVISD::WADD/WSUB. (#210862)
https://invent.kde.org/qt/clang/llvm-project/-/commit/0228facbd558a55e7db6646572d857d1b0cf9596

Git commit c096c8ddf1fee7777f9724c05f04fa3f5d2033d3 by GitHub (on behalf of Matt Arsenault) on 21/07/2026 at 09:06..
PPC: Remove manual run of machine verifier (#208032)

This is redundant with using the standard -verify-machineinstrs.
It's also confusing / worse, since the error is not produced to
stderr.
https://invent.kde.org/qt/clang/llvm-project/-/commit/c096c8ddf1fee7777f9724c05f04fa3f5d2033d3

Git commit 9e2664e70c55bfd68b6c982a0087eadc5edc37f9 by GitHub (on behalf of Momchil Velikov) on 21/07/2026 at 09:07..
[GVN] Rename some functions to follow LLVM naming conventions (NFC) (#210332)
https://invent.kde.org/qt/clang/llvm-project/-/commit/9e2664e70c55bfd68b6c982a0087eadc5edc37f9

Git commit bd07f0c81cad3510d3a0288e6f6feb2b2b475970 by GitHub (on behalf of Ramkumar Ramachandra) on 21/07/2026 at 09:14..
[VPlan] Drop redundant ArrayRef constructions (NFC) (#210680)
https://invent.kde.org/qt/clang/llvm-project/-/commit/bd07f0c81cad3510d3a0288e6f6feb2b2b475970

Git commit feabbb0f4611a9c26d6ae694232bfca7964e6233 by GitHub (on behalf of Benedek Kaibas) on 21/07/2026 at 09:15..
[analyzer] Fix false positive when a lifetimebound method is called during destruction (#210801)

When a `lifetimebound` method is called during destruction the checker
emits warnings which leads to false positives. To avoid this a dangling
stack source is not reported if any frame on the current stack belongs
to a destructor.
https://invent.kde.org/qt/clang/llvm-project/-/commit/feabbb0f4611a9c26d6ae694232bfca7964e6233

Git commit 46fb353e5d48097b0056ec3eddf77d6ce41bf226 by GitHub (on behalf of Simi Pallipurath) on 21/07/2026 at 09:18..
[compiler-rt][test] Skip page-size feature detection under emulators. (#210683)

This avoids adding a page-size-* lit feature when compiler-rt tests are
configured to run through an emulator.

Perviously this used to work because failure to detect the page size
would fall back to 4096. Now after this change
https://github.com/llvm/llvm-project/pull/209175, the code tries to
execute config.python_executable through the emulator. For
emulator-based test configurations, this is inappropriate. The function
now returns None when an emulator is configured, and the lit feature is
only added when a concrete page size is available.
https://invent.kde.org/qt/clang/llvm-project/-/commit/46fb353e5d48097b0056ec3eddf77d6ce41bf226

Git commit dce3dc80492263e263535627b80ce948db4b2fcc by GitHub (on behalf of Younan Zhang) on 21/07/2026 at 09:18..
[Clang] Add NormalizedConstraint::dump() (#210498)

This facilitates debugging with concepts, particularly when we need to
check complex parameter mappings.

Since this is mainly for debugging purpose, we don't promise any text
stability and hence no tests provided.
https://invent.kde.org/qt/clang/llvm-project/-/commit/dce3dc80492263e263535627b80ce948db4b2fcc

Git commit 50f7af6ab4be6869d36693001c1d5fadb25f8424 by Momchil Velikov on 21/07/2026 at 09:20..
[GVN] Remove unused debug helper (NFC)

The `GVNPass::dump` method is not used anywhere. Moreover, there's
no `GVNPass` state that corresponds to its parameter type. Even if a
`GVNPass::dump` method could be useful, this one wasn't it.
https://invent.kde.org/qt/clang/llvm-project/-/commit/50f7af6ab4be6869d36693001c1d5fadb25f8424
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.