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 upgrade (v4-kusa) #9627
Conversation
Nekotekina
commented
Jan 19, 2021
•
edited
edited
- Added additional analyser layer which could possibly inflate cache size, but it didn't happen. Please report if you get unusually big executable cache with v4-kusa.
- Added nounwind attribute to compiled function. It reduced their size significantly.
- Compiled certain rare functions with "no branch tables" on per-instruction basis.
- Optimized small blocks with 1-3 instructions, without a terminator: removed state checks for them.
- Fixed some minor bugs and implemented rare instruction (ADD with overflow check).
- Removed some silly global variables. Now compiled functions receive 7 parameters, such as mem ptr and some PPU regs.
- Used GHC calling convention: it allows to pass a lot of arguments and saves no registers.
- Implemented ppu_escape as very fast equivalent to longjmp, but only works with GHC CC gate.
- Added unused yet greedy mode flag. It will compile every instruction plus it will allow breakpoints by injecting path buffer into every compiled entity, in order to enable fast breakpoints with PPU LLVM, and also as a last resort compatibility measure.
Was only able to run simple programs, will likely crash on most games. Still investigating. |
77f06a6
to
0f04a57
Compare
I think it works now |
ee85df5
to
46c6536
Compare
There is some slow progress. |
a40ec7e
to
1ad0771
Compare
Tested NieR Replicant and MotorStorm, seems to work fine, but needs checking with more games |
B2S, SCV, Tekken 6 and TTT2 work fine with this PR |
Persona 5, Resistance 2 and NCAA 14 working fine. |
5c36126
to
09d0f79
Compare
Not everything that was planned was implemented at once, but there is definitely some progress. |
Ok, will test this one as is, try to commit new non bugfix changes on a new PR so we can keep track of possible regressions correctly |
Just fixed an assertion on compilation. |
Tested several games, working
|
Compile possibly executable holes between detected functions. Add unused "PPU LLVM Greedy Mode" option (for future updates). Add "nounwind" attribute to compiled functions (reduces size).
Add blocks from relocations.
PPU LLVM: optimize small blocks
Get rid of some global variables. Implement ppu_escape (unused yet). Bump PPU cache version to v4.
The correct way to test is remove all PPU and SPU caches ? RSX shaders also ? |
No need to remove any. PPU cache version was bumped, so the old one won't be used, SPU and RSX aren't touched here as far as I know |
Thanks for your reply. |
Is this supposed to help with Daytona USA? I still see flickering textures with latest build 11707 |
This update makes rpcs3 unable to use cheatebootpkg or modified eboot (cheats), which will lead to RPCS3 shutdown :( |