dynarmic icon indicating copy to clipboard operation
dynarmic copied to clipboard

x64: Improve register allocator

Open merryhime opened this issue 3 years ago • 3 comments

merryhime avatar Jul 16 '22 11:07 merryhime

AVX512 doubles the amount of SIMD registers but requires instructions to emit in EVEX form.

It might be worth detecting when AVX512{F,VL} is available and having an alternative UseScratchXmmEVEX function of some sort that allows access to these upper SIMD registers since right now I just hard-code their usage.

https://github.com/merryhime/dynarmic/blob/da5d06c32ac0b9cb257dda22e5a1ac9a55ee92c2/src/dynarmic/backend/x64/emit_x64_vector.cpp#L571-L572

Wunkolo avatar Jul 16 '22 15:07 Wunkolo

Actually a better idea with likely larger gains is maybe even just keeping the allocator as it is and using those new registers as extra spill-space.

Wunkolo avatar Jul 16 '22 15:07 Wunkolo

Upper AVX512 xmm16-31-registers as spill-space is being addressed in #748

Wunkolo avatar Feb 24 '23 20:02 Wunkolo