Perf: default PHPCFG Simplifier to use-chain path (#23056) - #23070
Merged
Merged
Conversation
Opcode dumps match the legacy CFG walk on a curated corpus; keep PHPCFG_SIMPLIFIER_USECHAIN=0 / PHPCFG_SIMPLIFIER_LEGACY=1 for bisect. Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
added a commit
that referenced
this pull request
Jul 25, 2026
…3075) Pillar 1: north-star5-verify --fast step 4f-m failed (4470c186… vs live 34cc1d83…) after PropertyHooks/clone-with/Simplifier merges. Stamp with BOOTSTRAP_GEN0_ALLOW_UNVERIFIED_STAMP=1 so provenance=unverified-restamp is explicit (#22966). Honest verified-fresh rebuild remains #22717. Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks
PurHur
added a commit
that referenced
this pull request
Jul 25, 2026
…ift (#23075) (#23077) * Trust: restamp gen-0 fingerprint after #23059/#23066/#23070 drift (#23075) Pillar 1: north-star5-verify --fast step 4f-m failed (4470c186… vs live 34cc1d83…) after PropertyHooks/clone-with/Simplifier merges. Stamp with BOOTSTRAP_GEN0_ALLOW_UNVERIFIED_STAMP=1 so provenance=unverified-restamp is explicit (#22966). Honest verified-fresh rebuild remains #22717. Co-authored-by: Cursor <cursoragent@cursor.com> * Trust: restamp gen-0 fingerprint after #23076 CURLFile drift (#23075) Master moved (#23064/#23076) while the prior restamp was in flight; live fingerprint is now 94f60af8… (was 34cc1d83…). Keep provenance=unverified-restamp. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Sep 1, 2026
PurHur
added a commit
that referenced
this pull request
Sep 1, 2026
…36250) (#36257) The patch_already_applied grep matched replaceVariablesByCfgWalk from the July 5 partial apply, so the #23070 default flip never ran on dev boxes. Add an overlay that upgrades partial trees and repairs duplicate cfg-walk methods from a bad patch(1) apply. Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
PHPCFG_SIMPLIFIER_USECHAINthe compile default (was lint-only opt-in) so Zend full-spine / gen-0 rebuild drops the O(phis×blocks) CFG walk (~3× CPU on the profiled path from Perf: gen-0 rebuild cost is two quadratic scans — Simplifier CFG walk (fix exists, gated) and PropertyHooks::isInsideFunctionBody (no cache) #23056).PHPCFG_SIMPLIFIER_USECHAIN=0orPHPCFG_SIMPLIFIER_LEGACY=1.SimplifierUseChainOpcodeEquivalenceTest; clear legacy env in gen-0 refresh launchers.Closes #23056
Validation
examples|lib|ext/standard|bin|srcsample (files ≤200KB); earlier smaller corpus also 0 opcode diffs (CFG pretty-print / inferred type labels can still differ)../script/phpunit.sh --filter SimplifierUseChainOpcodeEquivalenceTest→ OK 6 tests./script/apply-patches.sh→Skip php-cfg-simplifier-use-chain.patch (already applied)php bin/vm.php examples/000-HelloWorld/example.phpwith default andUSECHAIN=0→ Hello WorldNotes
north-star5-fast(gen-0 fingerprint still needs verified-fresh rebuild; heap remains a separate constraint per Gen-1+ #1492: committed gen-0 seed cannot be rebuilt — refresh OOMs at 48 GiB, 44 restamps since the blob last changed (script/bootstrap-refresh-gen0-sidecar.sh) #22642).Test plan
PHPCFG_SIMPLIFIER_LEGACY=1Made with Cursor