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

PPU LLVM: Get rid of "Applying PPU Code" Stage, use smart symbol resolver function instead #15333

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Mar 19, 2024

Instead of resolving all function addresses externally one by one, resolve them all internally within a single function that populates the PPU jumptable which is almost instantaneous. I learned some nice things during the making of this PR, first, it took extremely long amount of time to compile this function when the loop has been unrolled instead looped over arrays, so this made me learn new concepts such as the usage of PHI nodes. This makes the booting of "Skate 3" much smoother for example.
For this purpose, I had the audacity to partially invalidate LLVM cache. (only the last module, which contains the resolver function, is invalidated for each file)

@elad335 elad335 added Optimization Optimizes existing code LLVM Related to LLVM instruction decoders ☘️ Power Saving Aims to reduce power consumption of RPCS3 labels Mar 19, 2024
@elad335 elad335 merged commit 2f822ab into RPCS3:master Mar 20, 2024
4 of 6 checks passed
@Augusto7743
Copy link

Now not more long time applying ppu code when loading an game !
In previous build trying load some games with large numbers (above 200) of PPUs is more than 1 or 2 minutes.
Now is instantaneous !
Tested with some games and all working correctly.
Now is as if RPCS3 are using less system memory too.

THANKS !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LLVM Related to LLVM instruction decoders Optimization Optimizes existing code ☘️ Power Saving Aims to reduce power consumption of RPCS3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants