Python shared CFG: optimize explicit-step binding order - #152
Draft
yoff wants to merge 1 commit into
Draft
Conversation
Late-inline the explicit-step after-value wrapper so AST and successor demand are bound before expanding control-flow nodes, without changing CFG semantics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.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
Introduce a private
explicitAfterValuewrapper withbindingset[ast, successor]andpragma[inline_late], and use it only withinexplicitStep. This binds caller AST/successor demand before control-flow-node expansion. CFG semantics are unchanged;NodeImpl.isAfterValueis untouched.This draft is stacked directly on
yoff-python-cache-cfg-node-mapat exact base SHA133845e41556803743fbc1f76e7fce54941f20a1.Validation
This is DCA-only aggregate validation, not a merge proposal.
Rank6ExplicitStep,Rank6Succ,Rank6BlockMembership,Rank6BlockSucc,Rank6Dominates,Rank6Reachable,Rank6SsaReads,Rank6SsaWrites, andRank6SsaPhi; target BQRS output was equal.Local validation:
codeql query format --check-only shared/controlflow/codeql/controlflow/ControlFlowGraph.qllExceptionReachabilityTest.qlSsaTest.qlThis draft preserves the DCA experiment as a clean rank-6 stack layer and is not proposed for merge.