[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/gandhi56/sandbox-vectorizer/topdown-vec'.
Changed from 891b0be17585754084e9c37db66116c18296eb65 to 9ab51a638292ff993893c1ab22b5d0a593ac9631
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 b11881e5daa280d322127d4c51dcf472dbcc1dd5 by GitHub (on behalf of Aiden Grossman) on 21/07/2026 at 23:21..
[BranchFolding] Fold away subsequent identical branches

If we have a BB that has a single conditional branch instruction it that
is identical to the previous block's branch instruction, we can delete
the BB as it is redundant.

This doesn't directly impact performance as such instructions are never
executed, but this can help decrease code size which can help with
overall icache pressure (though likely only slightly). The biggest
impact would probably be fitting more instructions into a single cache
line. This is probably almost a no-op with PLO but definitely doesn't
hurt.

Fixes #202763.

Reviewers: RKSimon, arsenm, krzysz00, topperc, lei137

Pull Request: https://github.com/llvm/llvm-project/pull/203110
https://invent.kde.org/qt/clang/llvm-project/-/commit/b11881e5daa280d322127d4c51dcf472dbcc1dd5

Git commit 8b9cce358bef26ae4cb9275dd6a43f903bafbaa0 by GitHub (on behalf of jimingham) on 21/07/2026 at 23:31..
Make result variables obey their dynamic values in subsequent expressions

This is a resubmit of the original patch: 6344e3aa8106dfdfb30cac36c8ca02bc4c52ce24:

Make result variables obey their dynamic values in subsequent
expressions (#168611)

When I originally submitted this, it caused intermittent flakey failures
on systems I didn't have access to, and I didn't have time to sort them
out, so I reverted the patch. I'm resubmitting this so I can run the
bots on it a few rounds to see if I can reproduce and diagnose those
intermittent failures.

Here's the commit log from the original submission describing the
change:

When you run an expression and the result has a dynamic type that is
different from the expression's static result type, we print the result
variable using the dynamic type, but at present when you use the result
variable in an expression later on, we only give you access to the
static type. For instance:

```
(lldb) expr MakeADerivedReportABase()
(Derived *) $0 = 0x00000001007e93e0
(lldb) expr $0->method_from_derived()
                ^
                error: no member named 'method_from_derived' in 'Base'
(lldb)

```

The static return type of that function is `Base *`, but we printed that
the result was a `Derived *` and then only used the `Base *` part of it
in subsequent expressions. That's not very helpful, and forces you to
guess and then cast the result types to their dynamic type in order to
be able to access the full type you were returned, which is
inconvenient.

This patch makes lldb retain the dynamic type of the result variable
(and ditto for persistent result variables).

It also adds more testing of expression result variables with various
types of dynamic values, to ensure we can access both the ivars and
methods of the type we print the result as.
https://invent.kde.org/qt/clang/llvm-project/-/commit/8b9cce358bef26ae4cb9275dd6a43f903bafbaa0

Git commit 08efe1c283f6614606eab7395f8db790e81c10f4 by Anshil Gandhi on 21/07/2026 at 23:42..
[SBVec] Refill ready list during topdown scheduling

Visit nodes which are ready according to the direction of scheduling.
https://invent.kde.org/qt/clang/llvm-project/-/commit/08efe1c283f6614606eab7395f8db790e81c10f4

Git commit 83ca45360cb451a79329e31abd6d28bf7741cc96 by Anshil Gandhi on 21/07/2026 at 23:42..
[SBVec] Add top-down vectorization to the unified Sandbox Vectorizer

Extend the Sandbox Vectorizer's `bottom-up-vec` pass so a single
implementation can vectorize in either direction, and add the top-down
strategy that walks def-use chains forward from a seed.

Direction selection
--------------------
The pass direction is chosen from the Region's auxiliary pass argument:
"bottom-up" (or empty, the default) and "top-down" map onto a
SchedDirection, and any other value is rejected with a fatal usage error.
The vectorizer always runs in the same direction as the scheduler.

Top-down traversal
------------------
Bottom-up starts from a seed slice (e.g. stores to consecutive addresses)
and recurses into operands. Top-down instead starts from a seed of
consecutive loads and recurses into *users*:

- vectorizeRec() registers the current bundle's vector (pre-order) before
  recursing, so instructions are marked vectorized as soon as they are
  claimed. This prevents sibling user bundles from claiming the same
  instruction and guarantees termination.
- VecUtils::getNextUserBundles() drives the walk. For each user of lane 0
  it tries to assemble a matching user for every remaining lane, requiring
  the same opcode, type, parent block, and operand-usage indices, and
  claiming each instruction at most once. Only complete bundles (one user
  per lane) are returned.
- A non-Widen legality result stops the walk down that path: the bundle is
  left scalar and no action is recorded. DiamondReuse results cannot occur
  top-down because already-vectorized users are skipped, so a bundle never
  contains an instruction already in InstrMaps.

Operand and external-use handling
---------------------------------
Because a user bundle is emitted after its operand bundle, emitVectors()
looks up each operand's vector in InstrMaps and creates a pack when the
operand was not vectorized. emitUnpacksForExternalUses() now redirects
only the genuinely external (non-vectorized) uses via replaceUsesWithIf(),
instead of a blanket replaceAllUsesWith() that would corrupt the operands
of user bundles not yet emitted. Scheduling is currently skipped for the
top-down direction (TODO).

Refactoring
-----------
Unify the two strategies to avoid code duplication: introduce a shared
BundleTy alias, move user-bundle collection into VecUtils (with unit
tests), and thread the direction through legality checks and vector
emission.

Co-authored-by: Cursor <[email protected]>
https://invent.kde.org/qt/clang/llvm-project/-/commit/83ca45360cb451a79329e31abd6d28bf7741cc96

Git commit 888483d17850addabb502027b16cf788f8b7c9e6 by Anshil Gandhi on 21/07/2026 at 23:42..
[SBVec] Refactor BottomUpVec pass for clarity and maintainability

- Corrected comments to clarify the direction of def-use and use-def chains.
- Changed the initialization of the SchedDirection variable to improve clarity.
- Updated documentation in vectorizeRec() to better describe the purpose of UserBndl.
- Removed outdated TODO comment regarding top-down vectorization scheduling.
https://invent.kde.org/qt/clang/llvm-project/-/commit/888483d17850addabb502027b16cf788f8b7c9e6

Git commit 6d91e20808e756eaf99e9945eda876e6dd1cbffc by Anshil Gandhi on 21/07/2026 at 23:42..
[SBVec] Track claimed users across bundles
https://invent.kde.org/qt/clang/llvm-project/-/commit/6d91e20808e756eaf99e9945eda876e6dd1cbffc

Git commit 342e31df935e8282025e89f3d9f3e2714ec736f8 by Anshil Gandhi on 21/07/2026 at 23:42..
3 element tests

- nits
https://invent.kde.org/qt/clang/llvm-project/-/commit/342e31df935e8282025e89f3d9f3e2714ec736f8

Git commit 9ab51a638292ff993893c1ab22b5d0a593ac9631 by Anshil Gandhi on 21/07/2026 at 23:42..
Add 3-way test to check for consecutive matching
https://invent.kde.org/qt/clang/llvm-project/-/commit/9ab51a638292ff993893c1ab22b5d0a593ac9631
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.