diff options
author | Shengchen Kan <shengchen.kan@intel.com> | 2023-11-02 00:12:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-02 00:12:05 +0800 |
commit | 860f9e5170767c08a879b592c9121d35e90a320e (patch) | |
tree | 0ce5865bccc294671d7483a7579652bf823d3b5a /clang/lib/Basic/Module.cpp | |
parent | e2550b7aa072130230baa9dba0feff808ffe907d (diff) | |
download | llvm-860f9e5170767c08a879b592c9121d35e90a320e.zip llvm-860f9e5170767c08a879b592c9121d35e90a320e.tar.gz llvm-860f9e5170767c08a879b592c9121d35e90a320e.tar.bz2 |
[NFC][X86] Reorder the registers to reduce unnecessary iterations (#70222)
* Introduce field `PositionOrder` for class `Register` and
`RegisterTuples`
* If register A's `PositionOrder` < register B's `PositionOrder`, then A
is placed before B in the enum in X86GenRegisterInfo.inc
* The new order of registers in the enum for X86 will be
1. Registers before AVX512,
2. AVX512 registers (X/YMM16-31, ZMM0-31, K registers)
3. AMX registers (TMM)
4. APX registers (R16-R31)
* Add a new target hook `getNumSupportedRegs()` to return the number of
registers for the function (may overestimate).
* Replace `getNumRegs()` with `getNumSupportedRegs()` in LiveVariables
to eliminate iterations on unsupported registers
This patch can reduce 0.3% instruction count regression for sqlite3
during compile-stage (O3) by not iterating on APX registers
for #67702
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
0 files changed, 0 insertions, 0 deletions