-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Dataflow: Refactor FlowState to be paired with Node #18633
Dataflow: Refactor FlowState to be paired with Node #18633
Conversation
) | ||
} | ||
|
||
private predicate partialPathOutOfCallable0( |
Check warning
Code scanning / CodeQL
Candidate predicate not marked as `nomagic` Warning
partialPathOutOfCallable
} | ||
|
||
pragma[noinline] | ||
private predicate partialPathThroughCallable0( |
Check warning
Code scanning / CodeQL
Candidate predicate not marked as `nomagic` Warning
partialPathThroughCallable
1a930cc
to
dd0a07e
Compare
Commit-by-commit review encouraged, but the second commit really needs to be viewed with |
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.
Nice refactor, trivial comments only. Also, performance needs to be fixed.
/* End: Stage 1 logic. */ | ||
} | ||
|
||
private module Stage1Common { |
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.
Should this be moved up before the Stage1
module, perhaps?
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.
It contains a bit of a mix of input and output predicates relative to the Stage1
module. It's mostly output, though, hence why I put it after.
|
||
private class Cc = boolean; | ||
|
||
/* Begin: Stage 1 logic. */ |
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 comment (and the end comment) is perhaps redundant now?
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.
Yes, I'll remove them.
@@ -169,4237 +171,2703 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> { | |||
/** | |||
* Constructs a data flow computation given a full input configuration. |
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.
QL doc should probably also mention the Stage1
parameter.
Wouldn't it be cheaper and simpler to pair it up with the access path instead? I imagine the newtype TAccessPath =
TNil(FlowState state) { ...} or
TCons(Content head, TAccessPath tail) { ... } |
I don't think so. It might be cheaper in terms of number of constructed elements of IPA types, but I definitely don't think it's simpler. Firstly, doing so would be a semantic change in all the cases where we aren't tracking an exact access path. Secondly, the tracking of |
72ca71e
to
73d7250
Compare
Dca looks good now. |
I think it might simply be due to reduced memory pressure, since we've removed a column from most predicates. Impressive nonetheless. |
That's great news! The stage timings seem to indicate |
I just checked |
This refactors the representation of FlowState in the data flow library. Stage 1 is extracted to its own file and then for subsequent stages we either use
NodeEx
directly or a(NodeEx, FlowState)
pair as the node type in order to eliminate theFlowState
column.