Job Noorman f46e2baeb3 ir3/spill: initialize base reg as late as possible
We currently insert the base reg at the very start of the shader. This
prevents enabling early preamble even if nothing is spilled in the
preamble.

Prevent this by keeping track of the least common ancestor of all block
that spill/reload and moving the base reg there.

Totals:
Instrs: 48207402 -> 48210556 (+0.01%); split: -0.00%, +0.01%
CodeSize: 101907026 -> 101909942 (+0.00%); split: -0.00%, +0.00%
NOPs: 8386320 -> 8387956 (+0.02%); split: -0.01%, +0.03%
MOVs: 1468853 -> 1469173 (+0.02%); split: -0.02%, +0.04%
COVs: 823724 -> 823852 (+0.02%); split: -0.00%, +0.02%
(ss): 1113167 -> 1113157 (-0.00%); split: -0.01%, +0.01%
(sy): 552317 -> 552306 (-0.00%); split: -0.01%, +0.00%
(ss)-stall: 4013046 -> 4013109 (+0.00%); split: -0.00%, +0.00%
(sy)-stall: 16741190 -> 16740000 (-0.01%); split: -0.02%, +0.01%
Preamble Instrs: 11506988 -> 11506257 (-0.01%); split: -0.01%, +0.00%
Early Preamble: 121339 -> 121367 (+0.02%)
Last helper: 11686328 -> 11686316 (-0.00%); split: -0.00%, +0.00%
Cat0: 9241457 -> 9243099 (+0.02%); split: -0.01%, +0.03%
Cat1: 2353411 -> 2354995 (+0.07%); split: -0.04%, +0.11%
Cat2: 17468471 -> 17468507 (+0.00%); split: -0.00%, +0.00%
Cat7: 1637795 -> 1637687 (-0.01%); split: -0.01%, +0.00%

Totals from 48 (0.03% of 164705) affected shaders:
Instrs: 347473 -> 350627 (+0.91%); split: -0.40%, +1.31%
CodeSize: 565490 -> 568406 (+0.52%); split: -0.23%, +0.74%
NOPs: 70496 -> 72132 (+2.32%); split: -1.07%, +3.39%
MOVs: 27524 -> 27844 (+1.16%); split: -1.23%, +2.39%
COVs: 6275 -> 6403 (+2.04%); split: -0.38%, +2.42%
(ss): 8850 -> 8840 (-0.11%); split: -0.76%, +0.64%
(sy): 4666 -> 4655 (-0.24%); split: -0.69%, +0.45%
(ss)-stall: 12116 -> 12179 (+0.52%); split: -0.65%, +1.17%
(sy)-stall: 266208 -> 265018 (-0.45%); split: -1.08%, +0.63%
Preamble Instrs: 20657 -> 19926 (-3.54%); split: -3.56%, +0.02%
Early Preamble: 0 -> 28 (+inf%)
Last helper: 25507 -> 25495 (-0.05%); split: -0.12%, +0.07%
Cat0: 76458 -> 78100 (+2.15%); split: -0.99%, +3.14%
Cat1: 82669 -> 84253 (+1.92%); split: -1.11%, +3.03%
Cat2: 89414 -> 89450 (+0.04%); split: -0.09%, +0.13%
Cat7: 8595 -> 8487 (-1.26%); split: -1.33%, +0.07%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36667>
2025-09-03 21:17:57 +00:00
2025-02-23 00:31:59 +01:00
2025-09-02 07:48:53 +00:00
2025-09-03 12:46:21 +00:00
2025-01-08 20:37:51 +00:00
2023-11-02 11:37:46 +00:00
2025-07-24 16:12:10 +00:00
2025-08-31 15:38:27 +00:00
2024-11-18 22:29:14 +00:00
2025-07-16 13:50:24 +00:00

`Mesa <https://mesa3d.org>`_ - The 3D Graphics Library
======================================================


Source
------

This repository lives at https://gitlab.freedesktop.org/mesa/mesa.
Other repositories are likely forks, and code found there is not supported.


Build & install
---------------

You can find more information in our documentation (`docs/install.rst
<https://docs.mesa3d.org/install.html>`_), but the recommended way is to use
Meson (`docs/meson.rst <https://docs.mesa3d.org/meson.html>`_):

.. code-block:: sh

  $ meson setup build
  $ ninja -C build/
  $ sudo ninja -C build/ install

Support
-------

Many Mesa devs hang on IRC; if you're not sure which channel is
appropriate, you should ask your question on `OFTC's #dri-devel
<irc://irc.oftc.net/dri-devel>`_, someone will redirect you if
necessary.
Remember that not everyone is in the same timezone as you, so it might
take a while before someone qualified sees your question.
To figure out who you're talking to, or which nick to ping for your
question, check out `Who's Who on IRC
<https://dri.freedesktop.org/wiki/WhosWho/>`_.

The next best option is to ask your question in an email to the
mailing lists: `mesa-dev\@lists.freedesktop.org
<https://lists.freedesktop.org/mailman/listinfo/mesa-dev>`_


Bug reports
-----------

If you think something isn't working properly, please file a bug report
(`docs/bugs.rst <https://docs.mesa3d.org/bugs.html>`_).


Contributing
------------

Contributions are welcome, and step-by-step instructions can be found in our
documentation (`docs/submittingpatches.rst
<https://docs.mesa3d.org/submittingpatches.html>`_).

Note that Mesa uses gitlab for patches submission, review and discussions.
S
Description
No description provided
Readme 538 MiB
Languages
C 75.5%
C++ 17.2%
Python 2.7%
Rust 1.8%
Assembly 1.5%
Other 1%