Skip to content

[AUTOMATED] Reuse immutable SLEIGH catalogs and SSA reachability - #204

Merged
sjkim1127 merged 4 commits into
mainfrom
codex/decomp-preparation-performance
Oct 19, 2026
Merged

sjkim1127 merged 4 commits into
mainfrom
codex/decomp-preparation-performance

Conversation

@sjkim1127

@sjkim1127 sjkim1127 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

[AUTOMATED]

Scope

Mechanical removal of duplicate preparation work, with the existing producer contract retained:

  • Borrow process-lifetime SLEIGH registry/entry catalogs instead of deep cloning whole catalogs. The public owned entry discovery API remains independently mutable; frontend selection only clones the chosen entry.
  • Compute operand reachability through the existing out-of-SSA edge-copy graph once per emission plan, reusing it in both phi filters. Return-ABI exceptions and observable-use handling are unchanged.
  • Add sharing/ownership tests and 12,288 equivalence comparisons against the previous recursive query.

No production dependency, CLI/schema, worker policy, recovery pass, type policy or timeout change. No control-flow snapshot borrowing is included: that experiment was excluded after an unresolved large-input slowdown.

Dependency

#203 has merged as d471210842c1eb064ba216e5a6bc80d66a73f7ef. This PR is now retargeted to main and includes the required branch update. Its diff contains only the mechanical optimization and its evidence.

Measured evidence

Frozen qualification corpus, revision 07dd95dbe6214b8a78fc1e4a55961ab515986489:

  • Fresh address-guided generation: 250/250 stripped functions returned; zero changed functions after excluding the seven explicit duration fields documented in the report. All code layers, variables/types, direct PCs, scoped line mappings, errors/fallbacks, evidence and non-time counters were compared.
  • Repeated 16-function subset: five alternating fresh-process samples per build per batch; fixed serial requested-function workers, same resource root, release profile and flags. Outputs are deterministic across those repeats.
  • Wall-time medians: Linux Snappy O0 2.3934 → 2.3243 s (2.89% less); Windows Snappy O2 1.2901 → 1.2525 s (2.91% less); macOS Ninja O2 1.4918 → 1.4878 s (0.27% less). Windows CPU time is almost unchanged; macOS CPU time increases.
  • One sequential candidate-first large Tracy O0 control pair: wall 155.854 → 149.095 s, CPU 1554.789 → 1590.412 s. Both outputs match the retained reference. This single pair is not a robust speed estimate.

The user paused other builds/benchmarks; no builds/tests from this task ran during the controlled timings. OS caches were not flushed and desktop scheduling remains a limitation. The evidence does not establish a corpus-wide speedup, Kuna parity, quality/ranking improvement or source execution parity. No corpus executable was run.

See docs/validation/decompiler-preparation-performance.md and its compact JSON for raw paired times, population, hashes, exclusions, commands and rejected-experiment details. Full raw outputs/profiles are retained locally under benchmark/artifacts/performance/2026-10-14.

Related datasets: qualification corpus, earlier raw corpus.

Validation

  • Final related nextest suite: 1,752 passed / 4 skipped (SLEIGH, pcode, decompiler, CLI).
  • Related crate checks, release CLI build, workspace fmt, diff check and owner-boundary scan passed.
  • Two transient walker failures (shared_token_operands_do_not_require_legacy_cursor_policy, test_walk_stack_backtrace_on_failure) occurred in an initial SLEIGH run. Subsequent full and isolated fresh-cache runs passed on both builds, and final remote CI passed. The initial cause is not established; counts and raw logs are documented.
  • Remote CI run 38571842311 passed on final head efe35ee6929ec16851f44f283c1ffef3ced70fb9: Linux/macOS tests, Linux native debugger tests, optional-feature checks, lint/security/owner gates and the real PE CLI smoke. It was dispatched explicitly because the stacked base is outside the main-only PR trigger.

Current-main integration review (2026-10-19)

  • Current submitted HEAD: 1d6acefd0b9d7e124197cb10ef6bb9c2d18ed78e. Its complete Git tree matches the locally validated integration tree exactly; branch updates introduced no production-content change.
  • SLEIGH, pcode, decompiler, CLI nextest: 1,790 passed / 4 skipped.
  • Release CLI build, workspace formatting and patch whitespace checks passed.
  • The existing CI MinGW PE fixture passed release CLI resource status, info, list JSON and the canonical decomp output checker. Seven requested sample functions returned both NIR/HIR; six scoped line maps passed line/binding checks. This is fixture-based CLI contract smoke, not source execution parity or a new performance measurement.
  • Existing CFG example unused-import/dead-code warnings remain.
  • Required remote CI on the new exact HEAD is pending; the earlier remote run above is historical evidence, not this HEAD's CI result.

Ready for the bounded mechanical change after required checks pass. No further speed investigation is included in this review cycle.

@sjkim1127
sjkim1127 changed the base branch from codex/line-address-provenance to main October 19, 2026 10:17
@sjkim1127
sjkim1127 marked this pull request as ready for review October 19, 2026 10:17
@sjkim1127
sjkim1127 enabled auto-merge October 19, 2026 10:17
@sjkim1127
sjkim1127 merged commit 9cf3dd5 into main Oct 19, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant