[PR #275] [MERGED] kb(technique): MWCC register allocation in matching decomps: vreg-index colouring, lifetime-split and sub-address-temp levers (+ objdiff/decomp.me workflow) #279

Closed
opened 2026-10-15 20:55:05 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rehan-remade/universal-modder/pull/275
Author: @rasanaruto-lgtm
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @rehan-remade

Base: main ← Head: kb-mwcc-regalloc


📝 Commits (7)

  • 2c7be8e kb(technique): MWCC register-allocation vreg-index rule + lifetime-split lever (and closing-gaps note)
  • dac93d3 kb: add formal no-path + UNSAT checks and the queryable dataset to the MWCC regalloc note
  • 0dc71a1 kb: add independent corroboration (SFA allocation_model, melee/tww) + toolchain .comment note
  • a590654 kb(technique): add the sub-address-temp lever; correct the 'unreachable' claims
  • ae6741f kb: MWCC register-allocation technique notes: review fixes
  • fdee18b Merge remote-tracking branch 'origin/main' into land/pr-275
  • 120baf2 kb: regenerate the index

📊 Changes

4 files changed (+399 additions, -1 deletions)

View changed files

📝 knowledge/INDEX.md (+3 -1)
📝 knowledge/index.json (+50 -0)
➕ knowledge/techniques/closing-mwcc-register-allocation-gaps-in-a-matching-decompil.md (+157 -0)
➕ knowledge/techniques/mwcc-register-allocation-vreg-index-colouring-rule-and-the-l.md (+189 -0)

📄 Description

Adds two technique notes on MWCC register allocation for matching decompilation:

  • knowledge/techniques/mwcc-register-allocation-vreg-index-colouring-rule-and-the-l.md (new) - the two rules this session proved: MWCC's colourer hands saved registers out by descending vreg index (locals form one block in reverse declaration order, temps above; a first-declared local can't out-rank a constant pool), and a lifetime split only recolours when the value is non-rematerializable and the copy's live range overlaps (x2 = x with an overlapping range; &x is just a reliable way to force it).
  • knowledge/techniques/closing-mwcc-register-allocation-gaps-in-a-matching-decompil.md (from an earlier session) - the address-of / (double)0 pool levers.

Also refreshes knowledge/INDEX.md / index.json. um kb check passes.

Source case: Mario Kart Wii KartState::updateCollisions, taken 86.99% -> 93.44% by the split lever, then documented as a frontend vreg-numbering artefact.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rehan-remade/universal-modder/pull/275 **Author:** [@rasanaruto-lgtm](https://github.com/rasanaruto-lgtm) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@rehan-remade](https://github.com/rehan-remade) **Base:** `main` ← **Head:** `kb-mwcc-regalloc` --- ### 📝 Commits (7) - [`2c7be8e`](https://github.com/rehan-remade/universal-modder/commit/2c7be8eaf7cf5d25c0acf70c8df47eaec4d7ca2e) kb(technique): MWCC register-allocation vreg-index rule + lifetime-split lever (and closing-gaps note) - [`dac93d3`](https://github.com/rehan-remade/universal-modder/commit/dac93d37dbf27b46ddb55c2b2e17645aa6386b9f) kb: add formal no-path + UNSAT checks and the queryable dataset to the MWCC regalloc note - [`0dc71a1`](https://github.com/rehan-remade/universal-modder/commit/0dc71a1bdeb4e8e2893b6c0710086a09b89fa1e8) kb: add independent corroboration (SFA allocation_model, melee/tww) + toolchain .comment note - [`a590654`](https://github.com/rehan-remade/universal-modder/commit/a590654082d0dba2364dc2bb5e47cc0a0b99070b) kb(technique): add the sub-address-temp lever; correct the 'unreachable' claims - [`ae6741f`](https://github.com/rehan-remade/universal-modder/commit/ae6741f7d219f75ef6b36ad77b171ea7c51458fa) kb: MWCC register-allocation technique notes: review fixes - [`fdee18b`](https://github.com/rehan-remade/universal-modder/commit/fdee18b0e1db6cc995337faf971dba01654cf8d3) Merge remote-tracking branch 'origin/main' into land/pr-275 - [`120baf2`](https://github.com/rehan-remade/universal-modder/commit/120baf2c1ef3c8c04a7b839e8354d6d6600bbf87) kb: regenerate the index ### 📊 Changes **4 files changed** (+399 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `knowledge/INDEX.md` (+3 -1) 📝 `knowledge/index.json` (+50 -0) ➕ `knowledge/techniques/closing-mwcc-register-allocation-gaps-in-a-matching-decompil.md` (+157 -0) ➕ `knowledge/techniques/mwcc-register-allocation-vreg-index-colouring-rule-and-the-l.md` (+189 -0) </details> ### 📄 Description Adds two **technique** notes on MWCC register allocation for matching decompilation: - `knowledge/techniques/mwcc-register-allocation-vreg-index-colouring-rule-and-the-l.md` (new) - the two rules this session proved: MWCC's colourer hands saved registers out by **descending vreg index** (locals form one block in reverse declaration order, temps above; a first-declared local can't out-rank a constant pool), and a **lifetime split only recolours when the value is non-rematerializable and the copy's live range overlaps** (`x2 = x` with an overlapping range; `&x` is just a reliable way to force it). - `knowledge/techniques/closing-mwcc-register-allocation-gaps-in-a-matching-decompil.md` (from an earlier session) - the address-of / `(double)0` pool levers. Also refreshes `knowledge/INDEX.md` / `index.json`. `um kb check` passes. Source case: Mario Kart Wii `KartState::updateCollisions`, taken 86.99% -> 93.44% by the split lever, then documented as a frontend vreg-numbering artefact. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 20:55:05 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rehan-remade/universal-modder#279
No description provided.