-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
base: main
Are you sure you want to change the base?
Go: improve path summary by changing post update nodes #13473
Conversation
4843d1c
to
9ea23c1
Compare
@@ -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() } |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAn...
9ea23c1
to
9e4f4fa
Compare
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.