7 Commits

Author SHA1 Message Date
Paul Bowen-Huggett
ee7ca0ddda
Make CombinerHelper methods const (#119529)
There are a number of backends (specifically AArch64, AMDGPU, Mips, and
RISCV) which contain a “TODO: make CombinerHelper methods const”
comment. This PR does just that and makes all of the CombinerHelper
methods const, removes the TODO comments and makes the associated
instances const. This change makes some sense because the CombinerHelper
class simply modifies the state of _other_ objects to which it holds
pointers or references.

Note that AMDGPU contains an identical comment for an instance of
AMDGPUCombinerHelper (a subclass of CombinerHelper). I deliberately
haven’t modified the methods of that class in order to limit the scope
of the change. I’m happy to do so either now or as a follow-up.
2024-12-20 08:29:18 +07:00
Thorsten Schütt
ccfe7d4b20
[GlobalIsel] Cleanup G_EXTRACT_VECTOR_ELT combines (#109047)
Reduce duplicated build vector patterns by exploiting variadic args.
Make index parameter const to improve hit rate.
Use `getIConstantFromReg` to retrieve immediate because they are not
fallible anymore.
Improve extraction from build vector and shuffle vector.
2024-09-19 20:36:33 +02:00
Thorsten Schütt
9b692e562d
[GlobalIsel] Combine G_VSCALE (#94096)
We need them for scalable address calculation and
legal scalable addressing modes.
2024-06-06 12:22:52 +02:00
Thorsten Schütt
6d90ac1e06
[GlobalIsel] Combine freeze (#93239) 2024-05-29 18:05:33 +02:00
Thorsten Schütt
b42f553af5
[GlobalIsel] Combine extract vector element (#90339)
look through shuffle vectors
2024-05-07 07:12:58 +02:00
Thorsten Schütt
bc349cea7a
[GlobalIsel] combine insert vector element (#89363)
preliminary steps
poison symbols
2024-04-27 08:39:35 +02:00
Thorsten Schütt
8bb9443333
[GlobalIsel] Combine G_EXTRACT_VECTOR_ELT (#85321)
preliminary steps
2024-04-02 09:01:24 +02:00