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
Shared: add in/out barriers with flow state #14305
Conversation
c23e88c
to
d501856
Compare
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 reasonable to me.
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.
This only checks the new barriers on the state-transitioning steps. It also needs to be checked for a lot of other case (state-preserving local steps, jump steps, read steps, store steps, and call edges).
|
Thanks for catching this @aschackmull. As discussed offline, I've put check at the |
| @@ -3888,6 +3903,7 @@ module MakeImpl<InputSig Lang> { | |||
| ) { | |||
| exists(ArgNodeEx arg, ArgumentPosition apos | | |||
| pathNode(mid, arg, state, cc, _, t, ap, _) and | |||
| not outBarrier(arg, state) and | |||
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.
s/out/in/, right? no never mind. outBarrier is right.
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.
LGTM
|
DCA runs look peaceful so I'll go ahead and merge |
Adds overloads of
isBarrierInandisBarrierOutthat take a FlowState.The most immediate use-case for these is to be able to implement these as calls to
isSourceorisSink, without losing the flow state:This is needed for the JS data flow migration. Since this isn't merged yet, I haven't added the use sites in this PR, though I have verified that it works in the JS queries where I have used it.
To get a bit more validation, I also ran a C++ experiment with this commit resulting in this evaluation which seems to look fine.