Skip to content

Go: improve path summary by changing post update nodes #13473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

owen-mc
Copy link
Contributor

@owen-mc owen-mc commented Jun 15, 2023

Cf. this comment and the surrounding discussion.

This PR adds new data-flow nodes which are used for post-update nodes. This means that the post-update node will now be in the expected place. This should make path summaries easier to understand.

@@ -11,7 +11,54 @@ private newtype TNode =
MkSsaNode(SsaDefinition ssa) or
MkGlobalFunctionNode(Function f) or
MkImplicitVarargsSlice(CallExpr c) { c.hasImplicitVarargs() } or
MkFlowSummaryNode(FlowSummaryImpl::Private::SummaryNode sn)
MkFlowSummaryNode(FlowSummaryImpl::Private::SummaryNode sn) or
MkPostUpdateNode(IR::Instruction insn) { insn = updatedInstruction() }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getAnUpdatedInstruction

result = IR::evalExprInstruction(any(SendStmt s).getChannel())
}

private IR::Instruction getAccessPathPredecessor2(IR::Instruction insn) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like getAWrittenNode is now unused, so we could remove that and getAccessPathPredecessor then remove the 2 here

result = getAWrittenInstruction()
}

private Expr updatedExpr() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getAn...

@owen-mc owen-mc force-pushed the go/improve-path-summary-by-changin-post-update-nodes branch from 9ea23c1 to 9e4f4fa Compare June 16, 2023 10:05
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