C#: Adopt shared SSA data-flow integration - #16936
Merged
Merged
Conversation
| } | ||
|
|
||
| private module DataFlowIntegrationInput implements Impl::DataFlowIntegrationInputSig { | ||
| private import csharp as Cs |
Check warning
Code scanning / CodeQL
Names only differing by case
hvitved
force-pushed
the
csharp/ssa-integration
branch
from
July 10, 2024 08:06
b5c4d66 to
6b1b308
Compare
hvitved
force-pushed
the
csharp/ssa-integration
branch
2 times, most recently
from
July 11, 2024 09:46
2b175c6 to
df69c4e
Compare
hvitved
force-pushed
the
csharp/ssa-integration
branch
2 times, most recently
from
July 11, 2024 19:38
5b70129 to
86f7735
Compare
hvitved
force-pushed
the
csharp/ssa-integration
branch
from
July 12, 2024 09:06
86f7735 to
591b745
Compare
|
|
||
| private newtype TNode = | ||
| TParamNode(DfInput::Parameter p) { | ||
| exists(WriteDefinition def | DfInput::ssaDefInitializesParam(def, p)) |
Check warning
Code scanning / CodeQL
Omittable 'exists' variable
hvitved
force-pushed
the
csharp/ssa-integration
branch
from
July 12, 2024 12:24
591b745 to
ac08fc5
Compare
hvitved
marked this pull request as ready for review
July 12, 2024 12:42
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).
hvitved
force-pushed
the
csharp/ssa-integration
branch
from
August 13, 2024 13:26
ac08fc5 to
6506034
Compare
hvitved
force-pushed
the
csharp/ssa-integration
branch
from
August 14, 2024 06:39
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
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#.