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

SPU LLVM: Precompilation Improvements and misc fixes #14595

Merged
merged 11 commits into from Sep 2, 2023

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Aug 31, 2023

  • A fix for SPU fdunction discovery, do not count non-r0 link branches and branch-to-self or branch-to-next. A bit sad but this cuts found functions in TLoU from around 22xx to exacly 1800.
  • Fix GOTO in the debugger in some conditions.
  • Fix instriuction scrolling direction with the arrow keys in the debugger.
  • Add CRC check to prevent use of invalid cache entries. (not perfect of-course)
  • Add minimal discovery of tail-calls for precompilation.
  • Revert a PPU Analyzer change, may address [Regression] God of War Ascension [BCES01741] crash after starting a New Game on a new profile (#14547) #14600.


u32 upper_bound = (m_start_addr + (steps * 4)) & address_mask;

if (m_cpu && m_cpu->id_type() == 0x55)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just incorporate this entire check into section above

@elad335
Copy link
Contributor Author

elad335 commented Sep 1, 2023

I have added some super-experiemental commits regarding SPU LLVM precompilation, now the count of functions should be about the same but it would take much more time to compile because it detects more instruction blocks.

@elad335 elad335 changed the title Misc SPU/Debugger fixes SPU LLVM: Precompilation Improvements and misc fixes Sep 1, 2023
@elad335 elad335 changed the title SPU LLVM: Precompilation Improvements and misc fixes [TESTERS NEEDED] SPU LLVM: Precompilation Improvements and misc fixes Sep 1, 2023
@Darkhost1999
Copy link
Contributor

Darkhost1999 commented Sep 1, 2023

RPCS3.log.gz
When batch compiling cache: Most games freeze with spu runtime built the interpreter.
Edit: Full log

@AniLeo
Copy link
Member

AniLeo commented Sep 2, 2023

Methodology:

  • 1st load: Create PPU/SPU cache ran, game booted afterwards, module count retrieved from the "Building SPU Cache..." dialog
  • 2nd load: After playing the game for a short amount of time, restarting the game and retrieving module count from the "Building SPU Cache..." dialog
Game 1st load 2nd load
LOTR: Conquest 1269 modules 2953 modules
  • LOTR: Conquest: One match of Instant action -> Black Gate -> Capture the flag

Also, I don't know if it's related to the PR or if the game just happened to glitch, but the AI felt very stupid, they weren't capturing their base point that was uncaptured plus one NPC got stuck without moving, there could be a SPU logic bug somewhere

@elad335
Copy link
Contributor Author

elad335 commented Sep 2, 2023

What is actually counted in precompilation is functions not modules so it's a different thing, I may change the text later.

@elad335 elad335 force-pushed the savestate-fix branch 2 times, most recently from ec822d1 to d2cb3c5 Compare September 2, 2023 08:24
@elad335 elad335 changed the title [TESTERS NEEDED] SPU LLVM: Precompilation Improvements and misc fixes SPU LLVM: Precompilation Improvements and misc fixes Sep 2, 2023
@elad335 elad335 added the Bugfix label Sep 2, 2023
@elad335 elad335 force-pushed the savestate-fix branch 2 times, most recently from dfad076 to bead931 Compare September 2, 2023 09:02
@elad335 elad335 merged commit dd4840c into RPCS3:master Sep 2, 2023
1 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants