-
Notifications
You must be signed in to change notification settings - Fork 83
Replace readwrite protection with read protection #1631
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
Conversation
Apparently skipped still require NOCHECK.
Oh no, after fixing conflicts (and adding a cram test for #1712), the evals counts in weak dependencies test have changed. EDIT: I now see why that's happening and it might not be a good idea to do this, especially since this isn't supposed to improve any precision either. I think I can extract the cleanup part and the fix for #1712 without doing the switch from readwrite to read. Basically, having more precise data internally means unknowns can change more without any visible effect:
This is exactly the kind of silly useless re-evaluation that I suspect we might be accidentally doing. We definitely shouldn't add more of those. |
Closing in favor of #1788. |
The mutex analysis collects two kinds of protection information: readwrite and write. The former is a subset of the latter.
This PR changes it to collect just read protection instead of readwrite. When asked for readwrite protection, the intersection is still taken to find mutexes that protect both all reads and all writes.
I hoped the
protection-read
privatization could slightly be improved by using read-protection instead of readwrite-protection for its extra check, but that didn't work out. As-is this is more of a refactoring/cleanup: analysis results aren't really affected, although the read-protection sets can be seen in g2html.While changing that I realized we currently use
write:bool
in two different ways:write=true
means write-protection andwrite=false
means readwrite-protection.write=true
means a global write andwrite=false
means a global read (only!).I don't think this causes any bugs but it's still rather confusing because there are no readwrite accesses to globals (separate read and write access events are emitted).
As-is this PR makes things more consistent and correct, although readwrite accesses are never emitted, so this could be encoded more precisely with polymorphic variants.