|
49 | 49 | ///
|
50 | 50 | /// For better identification an access base, use
|
51 | 51 | /// AccessedStorage::compute(). It returns an AccessedStorage value
|
52 |
| -/// that identifies the storage location of a memory access. It provides APIs |
| 52 | +/// that identifies the storage of a memory access. It provides APIs |
53 | 53 | /// for inspecting type of accessed storage and allows for disambiguation
|
54 | 54 | /// between different types of storage and different properties within a class.
|
55 | 55 | ///
|
|
64 | 64 | /// from an enforced begin_access or from any memory operation that is part of a
|
65 | 65 | /// formal access, then it returns a valid AccessedStorage value. If the memory
|
66 | 66 | /// operation is not part of a formal access, then it still identifies the
|
67 |
| -/// accessed location as a best effort, but the result may be invalid storage. |
| 67 | +/// accessed storage as a best effort, but the result may be invalid storage. |
68 | 68 | ///
|
69 | 69 | /// An active goal is to require compute() to always return a
|
70 | 70 | /// valid AccessedStorage value even for operations that aren't part of a
|
|
77 | 77 | /// make incorrect assumptions about the absence of access to globals or class
|
78 | 78 | /// properties.
|
79 | 79 | ///
|
80 |
| -/// identifyFormalAccess() is similar to AccessedStorage::compute(), but returns |
81 |
| -/// the formally accessed storage of a begin_access instruction. This must |
82 |
| -/// return a valid AccessedStorage value unless the access has "Unsafe" |
83 |
| -/// enforcement. The formal access location may be nested within an outer |
84 |
| -/// begin_access. For the purpose of exclusivity, nested accesses are considered |
85 |
| -/// distinct formal accesses so they return distinct AccessedStorage values even |
86 |
| -/// though they may access the same memory. |
| 80 | +/// AccessedStorage::computeInScope() returns an AccessedStorage value for the |
| 81 | +/// immediately enclosing access scope. Within a formal access, it always |
| 82 | +/// returns a Nested storage kind, which provides the begin_access marker. |
| 83 | +/// |
| 84 | +/// identifyFormalAccess() works like AccessedStorage::computeInScope(), but |
| 85 | +/// finds the storage corresponding to a begin_access marker, rather than an |
| 86 | +/// arbitrary address. This must return a valid AccessedStorage value unless the |
| 87 | +/// access has "Unsafe" enforcement. The given begin_access marker may be nested |
| 88 | +/// within another, outer access scope. For the purpose of exclusivity, nested |
| 89 | +/// accesses are considered distinct formal accesses so they return distinct |
| 90 | +/// AccessedStorage values even though they may access the same memory. This |
| 91 | +/// way, nested accesses do not appear to conflict. |
| 92 | +/// |
| 93 | +/// AccessPath identifies both the accessed storage and the path to a specific |
| 94 | +/// storage location within that storage object. See ProgrammersGuide.md and the |
| 95 | +/// class comments below for details. AccessPath::compute() and |
| 96 | +/// AccessPath::computeInScope() mirror the AccessedStorage API. |
| 97 | +/// AccessPath::contains() and AccessPath::mayOverlap() provide efficient |
| 98 | +/// comparison of access paths. |
| 99 | +/// |
| 100 | +/// AccessPath::collectUses() provides all reachable uses of the accessed |
| 101 | +/// storage, allowing the selection of Exact, Inner, or Overlapping uses. |
| 102 | +/// visitAccessedStorageUses() and visitAccessPathUses() generalize |
| 103 | +/// handling of all reachable uses for a given storage location. |
87 | 104 | ///
|
88 | 105 | //===----------------------------------------------------------------------===//
|
89 | 106 |
|
|
0 commit comments