[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 0cdc13f8a7b106140d22516e519ad70c7d24dace to c51734664236580d660cf9bbd8da748683b026b0
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 a24292c17ca1d5fb62f5841a158dc5832d99a408 by Anshil Gandhi on 21/07/2026 at 23:12..
[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/a24292c17ca1d5fb62f5841a158dc5832d99a408

Git commit 6875b359186fc1b191d9a6f28ea0b518914fd616 by Anshil Gandhi on 21/07/2026 at 23:12..
[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/6875b359186fc1b191d9a6f28ea0b518914fd616

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

Git commit 23df7d4767113054132113ae0ef670074538c29c by Anshil Gandhi on 21/07/2026 at 23:28..
3 element tests

- nits
https://invent.kde.org/qt/clang/llvm-project/-/commit/23df7d4767113054132113ae0ef670074538c29c

Git commit 253f2d8ec002ffe3775d52bf32a39b09ecd2ab7c by Anshil Gandhi on 21/07/2026 at 23:38..
Add 3-way test to check for consecutive matching
https://invent.kde.org/qt/clang/llvm-project/-/commit/253f2d8ec002ffe3775d52bf32a39b09ecd2ab7c

Git commit c51734664236580d660cf9bbd8da748683b026b0 by Anshil Gandhi on 23/07/2026 at 23:21..
Pass Claimed by ref to getNextUserBundles

A user should not be claimed by multiple successful
bundles. Added a test for this.
https://invent.kde.org/qt/clang/llvm-project/-/commit/c51734664236580d660cf9bbd8da748683b026b0
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.