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 upgrade (v4-kusa) #9627

Merged
merged 8 commits into from Feb 1, 2021
Merged

PPU LLVM upgrade (v4-kusa) #9627

merged 8 commits into from Feb 1, 2021

Conversation

Nekotekina
Copy link
Member

@Nekotekina Nekotekina commented Jan 19, 2021

  1. 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.
  2. Added nounwind attribute to compiled function. It reduced their size significantly.
  3. Compiled certain rare functions with "no branch tables" on per-instruction basis.
  4. Optimized small blocks with 1-3 instructions, without a terminator: removed state checks for them.
  5. Fixed some minor bugs and implemented rare instruction (ADD with overflow check).
  6. Removed some silly global variables. Now compiled functions receive 7 parameters, such as mem ptr and some PPU regs.
  7. Used GHC calling convention: it allows to pass a lot of arguments and saves no registers.
  8. Implemented ppu_escape as very fast equivalent to longjmp, but only works with GHC CC gate.
  9. 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.

@Nekotekina
Copy link
Member Author

Was only able to run simple programs, will likely crash on most games. Still investigating.

@Nekotekina Nekotekina force-pushed the llvmppu branch 6 times, most recently from 77f06a6 to 0f04a57 Compare January 23, 2021 15:14
@Nekotekina
Copy link
Member Author

I think it works now

@Nekotekina Nekotekina force-pushed the llvmppu branch 3 times, most recently from ee85df5 to 46c6536 Compare January 24, 2021 13:33
@Nekotekina
Copy link
Member Author

There is some slow progress.

@Nekotekina Nekotekina force-pushed the llvmppu branch 2 times, most recently from a40ec7e to 1ad0771 Compare January 26, 2021 20:16
@AniLeo
Copy link
Member

AniLeo commented Jan 27, 2021

Tested NieR Replicant and MotorStorm, seems to work fine, but needs checking with more games

@raveskirza
Copy link

raveskirza commented Jan 28, 2021

B2S, SCV, Tekken 6 and TTT2 work fine with this PR

@digitaldude555
Copy link

Persona 5, Resistance 2 and NCAA 14 working fine.

@Nekotekina Nekotekina force-pushed the llvmppu branch 5 times, most recently from 5c36126 to 09d0f79 Compare January 31, 2021 18:59
@Nekotekina Nekotekina changed the title PPU LLVM upgrade (WIP) PPU LLVM upgrade (v4-kusa) Jan 31, 2021
@Nekotekina
Copy link
Member Author

Not everything that was planned was implemented at once, but there is definitely some progress.
I managed to remove some legacy "variables" and move to GHC calling convention in line with SPU LLVM.
That's probably this for January.

@AniLeo
Copy link
Member

AniLeo commented Jan 31, 2021

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

@Nekotekina
Copy link
Member Author

Just fixed an assertion on compilation.

@AniLeo
Copy link
Member

AniLeo commented Jan 31, 2021

Tested several games, working

  • JoJo: All Star Battle
  • NieR Replicant
  • Persona 5
  • Skate 3
  • Yakuza 3

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).
@Augusto7743
Copy link

The correct way to test is remove all PPU and SPU caches ? RSX shaders also ?

@RainbowCookie32
Copy link
Contributor

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

@Augusto7743
Copy link

Thanks for your reply.
if old PPU cache wont' be used means that an new one will be created ...
I will test some games (Gran Turismo 5 Prologue, Ridge Racer 7 and others with issues) not removing any caches and after removing all caches.

@jpchow26
Copy link

jpchow26 commented Feb 8, 2021

Is this supposed to help with Daytona USA? I still see flickering textures with latest build 11707

@arcadee1977
Copy link

This update makes rpcs3 unable to use cheatebootpkg or modified eboot (cheats), which will lead to RPCS3 shutdown :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants