-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C++: Don't count every conversion as a use #11976
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
C++: Don't count every conversion as a use #11976
Conversation
f5ebcd2
to
a5374e9
Compare
|
a5374e9
to
6f17481
Compare
6f17481
to
1b45c5f
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.
LGTM. I'm definitely seeking that additional reassurance from DCA though. In the tests I see that we lose quite a lot of taint steps (as we'd expect) and some duplicate results (which is a good change).
Indeed. I've started a DCA run as well. I expected quite a lot of "lost results" in DCA. Mostly because we're getting less duplication, but also because we're fixing a class of dataflow looping that's demonstrated by the |
I've looked through all the results on DCA. They all appear to be either:
|
be359a3
into
github:mathiasvp/replace-ast-with-ir-use-usedataflow
This PR reduces the number of SSA reads by not considering conversions as reads. This partially fixes the looping behavior observed in #11963 (but it doesn't fix the one observed in #11975).
It should also provide a small speedup boost since we're reducing the amount of reads considered in the SSA phase.
Commit-by-commit review recommended. The meat of the PR is in 9de8d5c (which includes conversions from the set of uses). However, I saw a number of missing results from just that commit, and it took some time to debug why. The reason is as follows:
We mark a number of ad-hoc things as conversions for iterator flow (to handle temporary variables created by rvalue-to-lvalue conversions). When we mark these as conversions we'd also excluding those from the set of uses, and this breaks a bunch of things. So 7ecc346 adds an additional column to the
conversionFlow
predicate that we can use to decide whether to consider those ad-hoc conversions. This column should be_
for most things, but must befalse
when we're excluding the conversions inisUse
.Finally, the last two commits just accepts test changes. These all appear to be fine 🎉.