monobj: opus2 dive - #17662
Merged
Merged
Conversation
Merging the Pass-2 result accumulator into selectedTarget eliminates a register-bounce (mr r27,r23) and a separate selectedTarget=-1 init, matching the target which reuses the same register for result and selectedTarget. statWatch 96.725->96.905, unit 97.867->97.880. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The weapon-mode particle count is read from u16 script fields; holding it in a signed short forced extsh + cast, while the target zero-extends (clrlwi) and compares directly. int countC drops the cast and matches the loop bound. setRepop 96.920->97.897, unit 97.880->97.925. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rewriting the classId dispatch as an explicit (>= 0xA9 -> pbDone) else (pbSet2) chain emits the target's bge branch instead of our blt, matching block layout. setRepop 97.897->97.939, unit 97.925->97.927. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The volatile groupCursor was re-read between the groupCount[] index and the increment; reading it once into a local wcursor (keeping the volatile store and the post-store >=8 re-read) matches the target's single-load pattern. mlAttackCheck 96.493->96.702, unit 97.927->97.940. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Report for GCCP01 (5c88a85 - f030f7a)📈 3 improvements in unmatched items
📉 1 regression in an unmatched item
|
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.
Second Opus pass on monobj.cpp. Unit 97.867 -> 97.940 (+0.073).
Landed
resultaccumulator intoselectedTarget, dropping a register-bounce (mr) and a redundantselectedTarget=-1init — the target reuses one register for both.countCfromshorttoint— the u16 weapon-mode particle count was sign-extended (extsh) while the target zero-extends (clrlwi) and compares directly.>= 0xA9 -> pbDoneelsepbSet2chain, emitting the target'sbgebranch and matching block layout.groupCursoronce into a local in thewloopbody (keeping the volatile store + post-store>=8re-read), matching the target's single-load pattern and removing an extralwzreload.Walls confirmed (no source steer found)
m_scriptHandlepartial de-cache (all reload forms regress 94 -> 77/84).base + var*scale + constaddressing — target folds the const as a displacement (lfs/lhz disp(rX)), ours emits indexed (lhzx); not source-steerable.mr) — emergent coloring.&&-chain block layout (bge;b;bvsblt) and script de-cache.🤖 Generated with Claude Code