C#: Adopt shared SSA data-flow integration#16936
Merged
hvitved merged 2 commits intogithub:mainfrom Sep 17, 2024
Merged
Conversation
b5c4d66 to
6b1b308
Compare
2b175c6 to
df69c4e
Compare
5b70129 to
86f7735
Compare
86f7735 to
591b745
Compare
591b745 to
ac08fc5
Compare
aschackmull
reviewed
Jul 19, 2024
Comment on lines
182
to
184
| exists(Guard g, Expr e, AbstractValue v | | ||
| guardChecks(g, e, v) and | ||
| g.controlsNode(result.getControlFlowNode(), e, v) |
Contributor
There was a problem hiding this comment.
Why is this second disjunct not redundant now? Does it cover more than ssa variable reads?
Contributor
Author
There was a problem hiding this comment.
Good question: Yes, it covers more than SSA variable reads (it uses GVN, which--although it is unsound in general--is likely to produce valid guards).
ac08fc5 to
6506034
Compare
6506034 to
89a2381
Compare
aschackmull
reviewed
Sep 16, 2024
Comment on lines
758
to
760
| isUseStep = false | ||
| or | ||
| // Flow into phi (read)/uncertain SSA definition node from read | ||
| exists(Node read | LocalFlow::localFlowSsaInputFromRead(read, def, nodeTo) | | ||
| nodeFrom = read and | ||
| not FlowSummaryImpl::Private::Steps::prohibitsUseUseFlow(nodeFrom, _) | ||
| or | ||
| nodeFrom.(PostUpdateNode).getPreUpdateNode() = read | ||
| ) | ||
| not FlowSummaryImpl::Private::Steps::prohibitsUseUseFlow(nodeFrom, _) |
Contributor
There was a problem hiding this comment.
There's a pipeline duplication here, better add isUseStep = true to the second disjunct.
aschackmull
approved these changes
Sep 16, 2024
Contributor
aschackmull
left a comment
There was a problem hiding this comment.
Looks plausible to me.
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.
This PR adopts the newly introduced shared SSA data-flow integration layer. A side-effect is that we get phi-input barrier guards for free, which had not previously been ported to C#.