Repository navigation
SPU LLVM: Support PUTLLC16 in CellSpurs JobChain management - #17733
Conversation
|
Hi do you need any types of tests? Also can you marge master to it as there are also new optimizations so it will be hard to compare speed without them here? |
|
Yes you can test performamce differences. |
|
The branch crashes resistance 3. The crash can be reproduced in the "Haven" demo as well. |
195749d to
5e3d9f7
Compare
Resistance 3 is fixed! |
|
I made some testing and apparently I didn't get crashes or regressions. On my games, I didn't see performance improvement but probably they are not affected by this changes |
Experimental, may be reduced to specific patterns instead of being enabled globally.
_aligned_realloc may return the same pointer if the internal implementation finds it suitable. Fixes Windows' builds.
|
Because this change is merged into master can you open a regression ticket following all the information that the template requests. |
|
Any issues stemming from this need to go into a new regression ticket, following the template with log file, otherwise they will be missed |
|
Done, thanks! |





In Hot Shots Golf, one SPU atomic operation stands out more than the rest:

This operation, manages acquireship of cellSpurs Jobchain tasks.
After some observation, I've noticed that this atomic operation may be compatible with the PUTLLC16 optimization, which you can learn about here: #15429
But why it wasn't yet compatible for it? for few reasons it turns out.
BRSL, in the middle of the operation. But after inspecting what it does, it does not seem to make sense for the function. But after second inspection, I noticed that register 4 (R4) was used right after the function call. So I figured, that this must be a [[noreturn]] type of function which does not actually return to function. Implementing detection of this eliminates optimization failure number 1 for SPU Mega block size.After inspection, the second address cannot be interleaved with the cache line data of the operation. But, because of the usage of relative loads and stores, a runtime check was added in LLVM code to verify it. (otherwise resorting to the full and heavy PUTLLC)
Fixes #14724
Note: This pull requests affect both SPU Safe and SPU Mega block sizes.
Before
After