rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

[Experimental] PPU LLVM: Recycle identical functions

Open elad335 opened this issue 11 months ago • 6 comments

I noticed that more then 40% of functions examined in some executables, occur more than once throughout the executable. So, why not reuse their code when possible in order to reduce compilation and link time? There are some exceptions, not all identical functions are truly identical in meaning if they are located elsewhere so I also check if they contain any relative branch that tragets external code. (which changes the meaning of the function)

Edit: because of the spectacular bugs I created when debugging this PR, I discovered a bug in sys_prx_stop_module that is fixed here. (turns it it can abort an ongoing starting process of PRX)

elad335 avatar Mar 11 '24 11:03 elad335

Who wants to test MGS4 compilation time and link time (Applying PPU code)?

elad335 avatar Mar 11 '24 11:03 elad335

@elad335 My Compile FW FULL SPEED 14600KF Thanks Brow !!!!!

EmulationChannel avatar Mar 11 '24 20:03 EmulationChannel

Captura de tela 2024-03-11 190007 RPCS3.log

EmulationChannel avatar Mar 11 '24 22:03 EmulationChannel

Failed to boot Guitar Hero 5

image

Log: RPCS3.log

AniLeo avatar Mar 11 '24 23:03 AniLeo

Fails to boot LittleBigPlanet 2

image

Log: RPCS3.log

user21944 avatar Mar 12 '24 02:03 user21944

Failed to boot gt6 ·F 0:00:07.613961 {PPU[0x1000000] Thread (main_thread) [liblv2: 0x00284e60]} VM: Access violation reading location 0x2f646576 (unmapped memory) RPCS3.log

b1acksnow avatar Mar 12 '24 13:03 b1acksnow

LittleBigPlanet 2 crashes on boot

image

Log: RPCS3.log

user21944 avatar Mar 12 '24 14:03 user21944

Test all games Bug Boot Captura de tela 2024-03-12 164556 RPCS3.log

EmulationChannel avatar Mar 12 '24 19:03 EmulationChannel