feat(dataflow): fact subscribers#860
Conversation
a4428b9 to
82bad13
Compare
82bad13 to
b9126cc
Compare
|
I am quite confused by your description, do you have an example on what would be the difference between subscribers and dependents? |
@math-fehr I don't blame you I had trouble differentiating the two at first as well. Here's a good example: in dead code analysis, when a block goes from dead to live in the lattice, it enqueues the block and every single operation within that block for every analysis that's subscribed to it. Now, you could have only |
|
So what would subscribers do in that case? |
@math-fehr for every subscribed analysis, it enqueues the pair (subscribed analysis, block) and (subscribed analysis, operation) for every operation in the block. |
Instead of having every single one of these pairs in |
|
Closed in favor of #859 |
This adds an extra field to
Factfor analyses subscribed to it. This is much broader than aFact f'sdependents, which are for otherFacts that need to be notified whenfchanges. Subscribers can be used to notify an arbitrary number ofFacts of the subscribed analysis. This is used in both dead code analysis and sparse analyses like constant propagation analysis.