Dataflow: Implement call context grouping to improve performance
This replaces our call context representation with a set-based representation of the allowed call edges, thus unifying equivalent call contexts. This unification means that we avoid redundant computation when a callable is reachable with several different, but equivalent call contexts.
In some cases I've observed 3000 equivalent call contexts, which will now be replaced by a single entity, and in that particular case the total tuple count for the stage was cut in half.
Commit-by-commit review encouraged. The first commit introduces the MakeSets primitive, which is then used to collapse local call contexts. Then a sequence of refactoring commits follow. And finally, the "Dataflow: Switch call context to a set representation" commit contains the implementation of and switch to fully set-based call contexts. This commit also does some reshuffling to ensure proper caching in CachedCallContextSensitivity.
Overall approach LGTM. A few comments/suggestions.
All comments should be addressed now.
More comments addressed. (Including one change that had somehow slipped from the first commit).
Perhaps it is worth running a final batch of DCA for all languages before merging?
Sure. Running now.
Dca looks good.
Rebased to fix CI.