[qt/clang/llvm]: 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
Pushed by mirror-service into branch 'upstream/users/ergawy/enclode_in_scf.execute_region_2'.
Changed from 0000000000000000000000000000000000000000 to b4383227dbb1210635783b948d4157e81290d24f
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 a64f7412551ae63a49dd8617f93ab89878288879 by GitHub (on behalf of Arseniy Obolenskiy) on 20/07/2026 at 05:22..
[SPIR-V][NewPM] Register SPIRVStructurizer with the new pass manager (#209965)
https://invent.kde.org/qt/clang/llvm/-/commit/a64f7412551ae63a49dd8617f93ab89878288879
Git commit 9d2e7e6836beadbe63380f64c716df2c086ff2ea by GitHub (on behalf of Lukas) on 20/07/2026 at 06:39..
[FixIrreducible][UnifyLoopExits] Support switch statements (#206567)
This builds on #149308, which implemented `callbr` support.
The same approach of splitting multi-branch edges entering irreducible
loops can be used for switches. It does not introduce any new switch
statements, but alleviates the requirement of having to run the
`LowerSwitch` pass first. This makes the pass usable for users other
than AMDGPU, which can handle switch statements (e.g., WebAssembly, see
[here](https://github.com/llvm/llvm-project/pull/181755#issuecomment-3936316307)).
I'm also implementing a flag into the `ControlFlowHub` to support
switches as well, for which I will open a separate PR. Currently the
`ControlFlowHub` creates a branch-sled, mimicking a `switch` (a series
of blocks consisting only of conditional branches, selectively entering
an irreducible loop at a certain point or continuing to the next
potential entry point). If the target can support switches, that should
be the clear goal here, as shown in the image below. This PR implements
the step from (a) to (b), whereas extending the `ControlFlowHub`
represents the step from (b) to (c). ((c) to (d) already exists through
`SwitchToLookup` and `SwitchToArithmetic`).
<img width="1055" height="432" alt="image"
src="https://github.com/user-attachments/assets/780b7894-1895-4137-8148-b2bbc7f73a8f"
/>
The test cases in `switch.ll` were adapted from the `callbr.ll` tests
using an LLM to ensure equivalent coverage. I've manually reviewed the
control flow and conditions for every case, and the final assertions
were generated using `update_test_checks.py`.
https://invent.kde.org/qt/clang/llvm/-/commit/9d2e7e6836beadbe63380f64c716df2c086ff2ea
Git commit c34d2c30e86358bfe308558b5e0719e9f5305153 by GitHub (on behalf of Aayush Shrivastava) on 20/07/2026 at 06:52..
[mlir] Fix mem2reg crash on scalable vector store/load with matching type (#209426)
Fixes #209065
`createInsertAndCast/createExtractAndCast` in `LLVMMemorySlot.cpp`
queried the bit size of the source/target types before checking whether
they were already identical. For scalable vector types (e.g.
`vector<[4]xi1>`), this size query implicitly converts a scalable
TypeSize to a scalar, which aborts. `mem2reg` hits this path for any
store or load whose value type exactly matches the slot's element type,
since `getStored/removeBlockingUses` run even when no cast is needed.
This fix adds an early return when the types are already equal, skipping
the size query, consistent with the existing short-circuit in
`areConversionCompatible/castSameSizedTypes`.
https://invent.kde.org/qt/clang/llvm/-/commit/c34d2c30e86358bfe308558b5e0719e9f5305153
Git commit e2572b883f0b2bc7a7a3808e484039f9382aa898 by GitHub (on behalf of Ming-Yi Lai) on 20/07/2026 at 07:12..
[LLD][RISCV][Zicfilp] Generate unlabeled landing pad-style PLT (#145461)
To support dynamic linking when Zicfilp is enabled, lpad insns are
inserted into PLTs. This patch generates the unlabeled landing pad-style
PLT, in which all the lpads have label `0`, when ZICFILP-unlabeled is
enabled:
--- PLT Header:
```
1: auipc t3, %pcrel_hi(.got.plt)
sub t1, t1, t2
l[w|d] t2, %pcrel_lo(1b)(t3)
addi t1, t1, -(hdr size + 16)
addi t0, t3, %pcrel_lo(1b)
srli t1, t1, log2(16/PTRSIZE)
l[w|d] t0, PTRSIZE(t0)
jr t2
```
--- PLT Entry:
```
lpad 0
1: auipc t2, %pcrel_hi([email protected])
l[w|d] t2, %pcrel_lo(1b)(t2)
jalr t1, t2
```
(The PLT format is specified in the psABI draft at
<https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/417>)
---------
Co-authored-by: Piyou Chen <[email protected]>
Co-authored-by: Kito Cheng <[email protected]>
https://invent.kde.org/qt/clang/llvm/-/commit/e2572b883f0b2bc7a7a3808e484039f9382aa898
Git commit 21d537e48677c6c9f3fe679694bba7bcaece90ce by GitHub (on behalf of Mel Chen) on 20/07/2026 at 07:28..
[LV][Test] Rename conflicting IR values to avoid FileCheck conflicts. nfc (#210293)
https://invent.kde.org/qt/clang/llvm/-/commit/21d537e48677c6c9f3fe679694bba7bcaece90ce
Git commit 99789ca18a7982a0b8d63e681d957590f67455c4 by GitHub (on behalf of A. Jiang) on 20/07/2026 at 07:32..
[libc++] Add tests for LWG3798 and mark it as Complete (#210640)
https://invent.kde.org/qt/clang/llvm/-/commit/99789ca18a7982a0b8d63e681d957590f67455c4
Git commit 9e2e9b33e14808541c0470b92ade34bee6608bf6 by GitHub (on behalf of Pavel Labath) on 20/07/2026 at 07:46..
[libc] Port process utilities to hermetic mode and enable some tests (#209999)
This is achieved by calling internal libc functions in hermetic mode. In
the overlay mode I keep calling the system functions so that the tests
work even on systems which don't have these implemented.
I also needed to implement the delete operators as both the libc proper
and the test framework uses them nowadays.
This is sufficient to enable all stdlib tests in hermetic mode, except
for one, which actually exposes a bug in the implementation. I'll deal
with that in a separate patch.
https://invent.kde.org/qt/clang/llvm/-/commit/9e2e9b33e14808541c0470b92ade34bee6608bf6
Git commit ba9a115e3ba30699cafe7815d851f89f02f821ea by GitHub (on behalf of Adam Scott) on 20/07/2026 at 07:51..
[AArch64] Fold vector shifts guarded against oversized amounts into USHL (#207628)
`select(icmp ult(amt, EltSize), shl(x, amt), 0)`, where EltSize is the
{8, 16, 32, 64} lane size, is the usual way to guard a variable vector
shift against shl poison. On AArch64 the guard is unnecessary because
USHL already returns zero once the shift amount reaches the lane size.
For v4i32:
Before:
```
movi v2.4s, #63
movi v3.4s, #32
and v1.16b, v1.16b, v2.16b
ushl v0.4s, v0.4s, v1.4s
cmhi v1.4s, v3.4s, v1.4s
and v0.16b, v1.16b, v0.16b
```
After:
```
movi v2.4s, #63
and v1.16b, v1.16b, v2.16b
ushl v0.4s, v0.4s, v1.4s
```
USHL reads each lane's shift amount as a signed value from its low byte
so amounts above 127 would be misread. The fold applies directly when
known bits can prove the amounts are at most 127 and otherwise the
amounts are clamped to EltSize with umin first, which is still one
instruction cheaper than the select.
NEON has no umin for 64-bit lanes so unbounded v2i64 amounts use the SVE
umin when available and otherwise keep the select.
lshr gets the same fold since it already lowers to ushl with a negated
amount.
This is the AArch64 counterpart of #86922, which added the same folds
for AVX2's variable shifts. This does the select(shift) half; the
shift(select) form will be a follow-up.
Closes #200698.
https://invent.kde.org/qt/clang/llvm/-/commit/ba9a115e3ba30699cafe7815d851f89f02f821ea
Git commit 92aded9ac802ed85971627bfa651697f960eefbf by GitHub (on behalf of Kareem Ergawy) on 20/07/2026 at 07:54..
[flang][PFT-to-MLIR] Wrap unstructured Fortran constructs in scf.execute_region (#208635)
Extend the PFT-to-MLIR (HLFIR/FIR) lowering so unstructured DO and IF
constructs are emitted inside scf.execute_region, hiding their
multi-block CFG behind a single op. OpenACC lowerings that reject
multi-block content (e.g. the "unstructured do loop in combined acc
construct" TODO in OpenACC.cpp) now see a structured op instead.
The main goal is to prevent propagating the "unstructured" property up
the evaluation tree just because one nested evaluation is unstructured;
which is the current behavior.
Flag: -mmlir --wrap-unstructured-constructs-in-execute-region (default
on).
An evaluation is wrappable iff all of the following hold:
* wrap flag on
* eval is parser::DoConstruct or parser::IfConstruct
* eval.isUnstructured
* branchesAreInternal(eval) -- every controlSuccessor in the subtree
targets a nested eval or the constructExit
* !hasIncomingBranch(eval) -- no outside eval branches into the body
(PFT's synthetic IfConstruct around `if(c) goto X` absorbs label targets
between the IF and X; the incoming-branch check excludes such wrappers
when an outer GOTO names one of those labels)
* does not contain a ReturnStmt -- its lowering creates the function's
final block in the current region, which would mis-parent func.return
* not an infinite DO and does not contain one (no LoopControl in any
nested DO): the wrap's yield is unreachable and the body has no
write-shaped side effects, so RegionDCE treats the wrap as trivially
dead and drops it. Excluding the whole enclosing construct keeps such
infinite loops visible in the parent CFG.
* not the body DO of an enclosing OpenACCLoopConstruct or
OpenACCCombinedConstruct -- nor one of the N collapsed iterator DOs
reached by walking down through `collapse(N)`. Such DOs are driven
directly into acc.loop by the OpenACC lowering, so wrapping them would
hide the iteration from the acc.loop op.
Diagnostics
-----------
Emit per-wrap and per-function diagnostics on stderr so the wrapping is
observable from a single compile invocation:
[wrap-unstructured] wrapped DO at <loc>
[wrap-unstructured] wrapped IF at <loc>
[wrap-unstructured] summary: N execute_region(s) wrapping unstructured
constructs at <loc>
The counter is reset per function and the summary is suppressed when no
wraps fire.
Co-authored-by: Claude Opus 4.7 <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 <[email protected]>
https://invent.kde.org/qt/clang/llvm/-/commit/92aded9ac802ed85971627bfa651697f960eefbf
Git commit 751fca6c06e4d29b8d2a62c307afce8ba6a0a101 by GitHub (on behalf of Fangrui Song) on 20/07/2026 at 08:06..
[Driver][test] Unwrap freebsd-mips-as.c RUN lines (#210658)
Collapse 3-line RUN blocks to 2 lines and move -### immediately after
%clang, matching the prevailing style for new tests.
https://invent.kde.org/qt/clang/llvm/-/commit/751fca6c06e4d29b8d2a62c307afce8ba6a0a101
Git commit a4ca7f3a670c84196cad4c739114b316fed6d8f1 by GitHub (on behalf of Pavel Labath) on 20/07/2026 at 08:09..
[libc][cmake] Remove proxy header XXX_macros -> XXX.h deps (#210008)
In the full build mode, these headers do not include the main XXX.h
header, which makes sense, because they exist to allow us only to expose
a part of it. They do include it in the overlay mode, but in this case,
they are referring to the header from the libc being overlaid, which
exists outside of the build system.
Also fix float_macros by moving
libc.include.llvm-libc-macros.float_macros from DEPENDS to
FULL_BUILD_DEPENDS, as llvm-libc-macros/float-macros.h is only included
under LIBC_FULL_BUILD.
https://invent.kde.org/qt/clang/llvm/-/commit/a4ca7f3a670c84196cad4c739114b316fed6d8f1
Git commit f214ce6b0a9a6af9b1d899895e29cbba68ee2726 by GitHub (on behalf of Pavel Labath) on 20/07/2026 at 08:10..
[libc][bazel] Add missing arpa/inet functions and tests (#210310)
Add bazel build targets for the remaining arpa/inet functions
(inet_addr, inet_aton, inet_ntoa, and inet_ntop) along with their unit
tests and supporting targets (__support_net_address, headers, and proxy
types).
Assisted by Gemini.
https://invent.kde.org/qt/clang/llvm/-/commit/f214ce6b0a9a6af9b1d899895e29cbba68ee2726
Git commit 72e0b55f9b1fd69030d7e9853a708bfd2fba36ec by GitHub (on behalf of Florian Hahn) on 20/07/2026 at 08:29..
[ConstraintSys] Solve sub-system with variables needed for query (#210432)
Update ConstraintSystem to only solve the sub-system containing all
variables relevant to a given query.
The sub-system contains the transitive closure of all variables in rows
involving the variables in the constraint to prove.
The iterative collection loop only needs very few iterations to
complete. The pruned system can significantly speed up Fourier–Motzkin
elimination and reduce the cost of copying the system.
This helps to notably decrease compile-time in cases when there are
larger numbers of variables & rows (especially during (Thin)LTO).
Highlights include
* stage1-ReleaseThinLTO: -0.16%
* stage1-ReleaseLTO-g: -0.19%
* stage1-aarch64-O3: -0.04%
https://llvm-compile-time-tracker.com/compare.php?from=1f2772f8e26beb909c2a559f1fb08697e3e06909&to=77fbe7926609da96a193254e44efd1d6f8a097de&stat=instructions%3Au
Note that we will now stop to simplify conditions in code we proved
dead/unreachable earlier; previously, unrelated constraints in the
system that form contradictions would allow proving any unrelated fact.
After pruning, unrelated facts will no longer contribute.
https://invent.kde.org/qt/clang/llvm/-/commit/72e0b55f9b1fd69030d7e9853a708bfd2fba36ec
Git commit 4234ff65326237102157875f6ddf098355864178 by GitHub (on behalf of Nikolas Klauser) on 20/07/2026 at 08:35..
Reapply "[libc++][NFC] Inline std::function members into the class body" (#209555) (#210260)
This caused LLDB to fail, which has been fixed now.
This reverts commit 7618426138aae95561da676a1d1e10ee0392bf78.
https://invent.kde.org/qt/clang/llvm/-/commit/4234ff65326237102157875f6ddf098355864178
Git commit 1ad0e6989597f550e1a5b53abd889366b65aa6c7 by GitHub (on behalf of Fangrui Song) on 20/07/2026 at 08:37..
[Driver,FreeBSD] Fix -pie for -r and -no-pie links (#210663)
Port Gnu.cpp changes ae623d16d50c and cac82e26c642 to FreeBSD and
Serenity: -r should suppress -pie. -nopie, OpenBSD specific, should not
be used by other OSes.
Group the options selecting the link mode and place them after -m, as
gnutools::Linker does, so that -r suppresses -export-dynamic and
--hash-style as well, and -no-pie overrides the -fsanitize PIE default.
Drop --enable-new-dtags: default in modern linkers.
Change -Bstatic to -static to follow Gnu.cpp (identical in lld and older
GNU ld).
https://invent.kde.org/qt/clang/llvm/-/commit/1ad0e6989597f550e1a5b53abd889366b65aa6c7
Git commit 37a2803740cc9df3d605431b2410c9d9c0bc5731 by GitHub (on behalf of Kamlesh Kumar) on 20/07/2026 at 08:39..
[AArch64] Add combine for interleave deinterleave (#208414)
These combines now can emit ldN/stN without interleaved access pass.
https://invent.kde.org/qt/clang/llvm/-/commit/37a2803740cc9df3d605431b2410c9d9c0bc5731
Git commit 6fb8d5fd507d976cb8072a7aa245c225c25ee08a by GitHub (on behalf of David Spickett) on 20/07/2026 at 08:42..
[lldb][docs] Remove image links from trace doc (#210664)
The document was first added in https://reviews.llvm.org/D105741 but
that did not include the images (they were not in the RFC or discussions
either).
https://invent.kde.org/qt/clang/llvm/-/commit/6fb8d5fd507d976cb8072a7aa245c225c25ee08a
Git commit 03b5c5285eaf0acdc1dc30c5be6e0a7cefeab16f by GitHub (on behalf of Nathan Gauër) on 20/07/2026 at 08:42..
[LSROA] Add logical SROA pass (#192058)
This commit adds a logical-pointer compatible SROA pass. As-is, the pass
does not optimizes nested structs, arrays, or usages of structured
alloca with non-structured GEP instructions.
Adding support for both is not complex, but increase the size of the PR,
hence we can start with this.
Next step will be to allow mem2reg to apply on logical alloca/ptr, and
to add support for nesting/arrays.
---------
Co-authored-by: Nikita Popov <[email protected]>
https://invent.kde.org/qt/clang/llvm/-/commit/03b5c5285eaf0acdc1dc30c5be6e0a7cefeab16f
Git commit b4383227dbb1210635783b948d4157e81290d24f by ergawy on 20/07/2026 at 10:26..
[flang][PFT-to-MLIR] reset Evaluation blocks between entry-point passes
A subprogram with an alternate ENTRY is lowered by walking the shared
PFT once per entry. Evaluation::block is populated during each walk
(top-level createEmptyBlocks and inside wrapUnstructuredConstruct's own
createEmptyBlocks), but the second pass previously inherited stale
pointers into the first entry's function/wrap regions. For a wrappable
IfConstruct nested inside a structured container, the entry block that
genFIR(IfConstruct) starts before creating its scf.execute_region then
sent the builder into the previous entry's region, and the wrap plus
its inner load ended up in the wrong func:
subroutine foo(a)
integer a
entry bar(a)
if (a .eq. 1) then
if (a .ne. 3) stop
end if
end subroutine
produced both scf.execute_region ops in _QPfoo, with an inner
fir.load referencing bar's %arg0 — 'fir.load' op using value defined
outside the region.
Fix: null every Evaluation::block in the shared PFT at the start of each
entry-point pass, so createEmptyBlocks fills a clean tree and later
reads (in particular the landing-pad reposition in genFIR(IfConstruct))
never see a pointer from a prior pass.
https://invent.kde.org/qt/clang/llvm/-/commit/b4383227dbb1210635783b948d4157e81290d24f