Commit Graph

58 Commits

Author SHA1 Message Date
Andrew Trick
628052810e Simplify AccessEnforcementOpts by leaving access markers in place.
The extra cost of deterministically deleting instructions is unnecessary. In the
long term, we'll want to verify that access markers exist after all SIL
passes. So just change their enforcement level rather than removing them.
2018-05-24 22:18:24 -07:00
Andrew Trick
0aa2eae2e7 AccessEnforcementOpts high-level comments. 2018-05-24 22:18:24 -07:00
Andrew Trick
0d3cf75c71 Fix AccessEnforcementOpts in debug builds. 2018-05-24 14:36:19 -07:00
Andrew Trick
c5475c9442 AccessEnforcementOpts test cases. 2018-05-24 00:27:00 -07:00
Andrew Trick
df1b9b404e Rework AccessEnforcementOpts SparseSet.
This makes the intention more clear and sets up
a new optimization to merge access scopes.
2018-05-23 09:23:39 -07:00
Andrew Trick
8d67ce18d0 Teach AccessEnforcementOpts to eliminate checks.
Previously, it only folded begin/end access into a single runtime
operation. When all accessed for a uniquely identified storage object
have been folded, then they can all be removed.

Reworked the design of the pass so this falls out naturally just by
updating AccessedStorageAnalysis.
2018-05-23 09:23:39 -07:00
Andrew Trick
7fc2d6267b Rename findAccessedStorageOrigin() to findAccessedStorageNonNested(). 2018-05-15 12:29:19 -07:00
Andrew Trick
495d5aecf6 [exclusivity] Add an access marker folding pass.
Use AccessedStorageAnalysis to find access markers with no nested conflicts.

This optimization analyzes the scope of each access to determine
whether it contains a potentially conflicting access. If not, then it
can be demoted to an instantaneous check, which still catches
conflicts on any enclosing outer scope.

This removes up to half of the runtime calls associated with
exclusivity checking.
2018-05-15 12:29:19 -07:00