This basic block analysis pass uses the tracked types to determine dead
stores. This is better than the one we already have in the code
generator because it also tracks dead stores through renames and it
allows removal of lookup results. Furthermore, it adjusts each store to
write the type most favorable to its readers. This avoids unnecessary
conversions at run time.
It cannot replace the other dead store elimination, yet, because it
doesn't see whether the results of rename operations are read after the
rename. This capability will be added in a separate change that also
tracks the register numbers. Once this is in place, we can delete the
other basic blocks pass.
Task-number: QTBUG-100157
Change-Id: I766c919412b6cf43befa7bdb1a6e5e11b41fe55b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This way we can uniquely track the stored types throughout the
compilation.
Change-Id: Ibf3814a37f105c2eede2a08f547ab5fbfa1c16e2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We will need to iterate the annotations in program order. Therefore, we
need an order map. QFlatMap fits here.
Change-Id: I9a7fe68b0e5aa817257ceabb4853b1554d3ad709
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
You can only change one register per instruction, and it doesn't have to
be the accumulator. We don't have to store the full register set in
every instruction annotation. It's enough to store the changed register.
This simplifies the logic around choosing the in/out accumulator types.
Now you can rely on the "in" accumulator to always be in the register
set, and the "out" accumulator to be the changed register if applicable.
There will typically be less than 10 registers active at any given
instruction. Therefore, use QFlatMap to store them, rather than QHash.
Also, rename the storage for the type conversions so that we can
actually see what they are.
Change-Id: I694ac2bce7911a4c290c1dccef34d28cde50a1d3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We want to be able to skip it.
Task-number: QTBUG-98305
Change-Id: Ibb0293d348f2828a28be4c458cf955b4cc706caa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>