Skip to content

Python: Shared SSA analysis#12152

Draft
yoff wants to merge 2 commits into
github:mainfrom
yoff:python/shared-ssa
Draft

Python: Shared SSA analysis#12152
yoff wants to merge 2 commits into
github:mainfrom
yoff:python/shared-ssa

Conversation

@yoff
Copy link
Copy Markdown
Contributor

@yoff yoff commented Feb 10, 2023

Very WIP. First commit defines a simple SSA analysis. The second commit defines various predicates to compare this shared SSA analysis with the usual one. These are all very ad-hock and should be replaced with proper tests.

class SourceVariable = Flow::SsaSourceVariable;

predicate variableWrite(BasicBlock bb, int i, SourceVariable v, boolean certain) {
exists(PY::ControlFlowNode def |

Check warning

Code scanning / CodeQL

Omittable 'exists' variable

This exists variable can be omitted by using a don't-care expression [in this argument](1).
}

predicate variableRead(BasicBlock bb, int i, SourceVariable v, boolean certain) {
exists(PY::ControlFlowNode read |

Check warning

Code scanning / CodeQL

Omittable 'exists' variable

This exists variable can be omitted by using a don't-care expression [in this argument](1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants