Repository navigation
Conversation
…optimization passes
illwieckz
force-pushed
the
illwieckz/nacl-armhf-opt-pass-limit
branch
from
October 26, 2026 08:45
6125c8c to
d908e6f
Compare
Member
Author
|
I'll submit the Saigo code later after some clean-up. |
illwieckz
force-pushed
the
illwieckz/nacl-armhf-opt-pass-limit
branch
from
October 26, 2026 08:48
d908e6f to
31a099b
Compare
Member
Author
Member
Author
Member
Author
|
After having submitted this I got new ideas and that led to the breakthrough I wasn't even really expecting anymore. That ride had been wild! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable optimization on nacl-armhf with Saigo but limit the amount of optimization passes.
We already know that Saigo produces broken ARM executables when optimizing them:
Until now I postponed the investigation, so I has simply disabled the optimization on armhf (but only on armhf) so we could test everything else until this optimization thing is investigated. That intentional optimization disablement is only meant to be temporary and only used on armhf, not on other architectures like amd64 which are fine.
I actually spent some times these days, using
-mllvm -opt-pass-limit=to find first pass limit where the build breaks (that is53696), then I successfully found some optimizations to disable in clang that would unlock to an higher limit. I'm now stuck at53799which is my third limit bisect. This is very time consuming and there the limit is probably in hundreds of thousands passes. Of course it's possible that at a time I stumble right on a broken pass that would unlock everything, but no one knows. There are hundreds of different optimizations to checks…So, I don't know if I will pursue that limit bisect effort. Unless an unexpected breakthrough, I wouldn't exclude that continuing that effort would spend a fulltime job for a complete week or even more, which is not worse the effort, and that I obviously cannot invest.
But since I know that limiting the amount of optimization passes makes possible to produce a sufficiently-optimized build while avoiding the bad optimization combinations, I just implemented in Saigo (patch to come) a variant of
-opt-bisect-limitnamed-opt-pass-limitwhich does exactly the same but never prints anyBISECTdiagnostic log, because this new option isn't a diagnostic tool but just a way to arbitrary limit the amount of optimization passes.This change uses that new Saigo option when detected to be implemented in the said Saigo build, otherwise fallback of complete optimization disablement as a safe fallback.
As said in the comments:
If one day we observe a new game change triggers the optimization bug again, we just have to lower the limit.
I did some performance measurement on a Orange Pi 5 (RK3588S, quad-core A76+quad-core A55), I intentionally drastically reduced the graphics quality (640×480 resolution, low preset) to make the CPU performance more obvious.
Here are some performance comparison observed on plat23, default spectator scene: