Data flow: Use precise call contexts in flowFwd()#3838
Conversation
0075a9e to
e59e183
Compare
|
I note that there are no performance or results changes in the CPP-Differences test. |
e59e183 to
1bc660a
Compare
|
Rebased and updated differences jobs in the PR description. |
c4a35a5 to
e518cba
Compare
|
Rebased. Here are some tuple counts for
And here are some tuple counts for
|
aschackmull
left a comment
There was a problem hiding this comment.
Some inline suggestions; otherwise LGTM.
| } | ||
|
|
||
| class CallContextAny extends CallContext, TAnyCallContext { | ||
| abstract class CallContextNoCall extends CallContext { } |
There was a problem hiding this comment.
Couldn't we define this simply with a charpred of not this instanceof CallContextCall instead of an abstract class? I think that would be slightly clearer.
There was a problem hiding this comment.
CallContext is itself abstract, so that doesn't work nicely.
This is the second step towards increasing the access path restriction for C# from 3 to 5, as for other languages.
The C# project https://github.com/mono/mono includes a rather involved visitor pattern, where call contexts such as this can drastically reduce dispatch. However, we currently only apply call contexts in the last
pathStepcalculation, which means that we get a blow-up in the access paths reachable byflowFwd, when increasing the access path restriction. This PR therefore adds call contexts also toflowFwd, to avoid the blow-up.Differences jobs: