[qt/qt/qtdeclarative]: 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/qt/qtdeclarative
Pushed by mirror-service into branch '6.12'.
Changed from 99e4f97503b18629ec8c374ff3c67f519ca73f64 to 374c433983bf847d5a6f396b103c7766acbca4af
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 8cc035af000b36c839ec53219243598bf2c6cdef by Olivier De Cannière (on behalf of Ulf Hermann) on 28/07/2026 at 12:52..
QmlCompiler: Fix the basic blocks validation

We have to follow the edges forward from the function entry point, not
backwards from every exit. Otherwise we'll skip infinite loops (that
don't return at all).

Change-Id: If0562c95101d3d0689b8b204a0a4721524042de6
Reviewed-by: Olivier De Cannière <[email protected]>
(cherry picked from commit 9b42b9ca62b62f0a0ddceb57cc2fe2bfc38d5844)
Reviewed-by: Fabian Kosmale <[email protected]>
https://invent.kde.org/qt/qt/qtdeclarative/-/commit/8cc035af000b36c839ec53219243598bf2c6cdef

Git commit 21fcc1ed29e6da2b63647a18b2cedb8f453f0a75 by Olivier De Cannière on 28/07/2026 at 12:52..
Compiler: Micro-optimize populateReaderLocations

- Make things const where possible
- Avoid needless copies
- Use CoW-less containers
- Make conversionOrigins return a reference

These changes have a significant impact on the compilation speed of
large functions.

Using the list of 5000 strings from the linked issue as a benchmark,
with this change in a release build, the time spent inside
populateReaderLocations drops from ~1700ms to ~500ms and the total
execution time of qmlcachegen drops from 1.8s to 0.6s.

A more fundamental algorithmic improvement may still be needed but this
is still an easy win.

Task-number: QTBUG-148164
Change-Id: I69fddf47572ea5384b778fa97e1c0371b50d0eb8
Reviewed-by: Ulf Hermann <[email protected]>
(cherry picked from commit 8e7626a8525719173b517133559f4ef2f11d213a)
Reviewed-by: Sami Shalayel <[email protected]>
https://invent.kde.org/qt/qt/qtdeclarative/-/commit/21fcc1ed29e6da2b63647a18b2cedb8f453f0a75

Git commit 374c433983bf847d5a6f396b103c7766acbca4af by Olivier De Cannière on 28/07/2026 at 12:52..
Compiler: Optimize the populateReaderLocations algorithm

populateReaderLocations finds the instructions that read the value
written from every write instruction. This is done to later optimize
away dead stores.

The algorithm used is quadratic and explodes in complexity on large
functions. It works by searching every possible downstream instruction
in reachable blocks. In low-branch programs this will scale at least as
n * n/2 where n is the number of instructions.

The algorithm is quite tangled and handles multiple things at the same
time deep inside nested loops:
-Blocks can be re-entered through backjumps
-Once a register is written to a second time, subsequent reads no
 longer read the value written by the original write instruction.
-Conversions and merges needs to be accounted for to be able to hold
 all possible values.
Removing work there saves a lot of time.

This patch reduces the amount of work that is done in the quadratic
section.

Since register contents can be identified uniquely by their d-pointer
now, we can precompute writes and reads in two linear scans of the
instructions using a hashmap of written register contents to write
instructions.

This again brings down the time spent inside populateReaderLocations on
the 5000 strings array benchmark from the linked issue from ~600ms to
~150ms. populateReaderLocations still accounts for around 45% of the
total execution time of qmlcachegen so more can probably be done.

Insight and initial implemention by Claude.

Task-number: QTBUG-148164
Assisted-by: Claude Sonnet 5
Change-Id: I410a0cb21924e3f5eea199018329cb0aca95ec3e
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
(cherry picked from commit 0f56e9f7efae41bf7da732e5174d19c2a45d9557)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
https://invent.kde.org/qt/qt/qtdeclarative/-/commit/374c433983bf847d5a6f396b103c7766acbca4af
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.