Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x86jit: Perform vector transfers instead of flushing to memory #18234

Merged
merged 5 commits into from
Sep 26, 2023

Conversation

unknownbrackets
Copy link
Collaborator

@unknownbrackets unknownbrackets commented Sep 25, 2023

This attempts to optimally retain values in registers even when going from and to Vec4. For example, a lv.q; vdot.t; sv.q previously caused the Vec4 to spill and each component to be loaded back, then to spill again and load as a vec4 for the store.

With this change, the values are kept in registers are reassembled if possible. This results in a 1-2% FPS improvement in LittleBigPlanet, for example. Could use more testing in other games, though. Remains to be seen if it'll manage to make any difference on arm64, but not done yet...

At this point LBP is around ~13% faster FPS than the old jit.

-[Unknown]

@unknownbrackets unknownbrackets added the x86jit x86/x64 JIT bugs label Sep 25, 2023
@unknownbrackets unknownbrackets added this to the v1.17.0 milestone Sep 25, 2023
It's faster, this performs better.
@unknownbrackets
Copy link
Collaborator Author

It does seem like doing this on arm64 may have finally made a dent in arm64 FPS, but still not sure since a breeze can make it vary so much.

-[Unknown]

@hrydgard
Copy link
Owner

Indeed seems plausible that keeping stuff in registers is very important on ARM64: x86 are optimized for fast-ish spilling since they have to do it so much due to low register count, while ARM64 doesn't really have that problem so I guess isn't as much...

@hrydgard hrydgard merged commit 9fffa33 into hrydgard:master Sep 26, 2023
18 checks passed
@hrydgard hrydgard modified the milestones: v1.17.0, v1.16.5 Sep 26, 2023
@unknownbrackets unknownbrackets deleted the x86-ir-transfer branch September 27, 2023 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x86jit x86/x64 JIT bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants