Skip to content

Commit f6d6f31

Browse files
committed
[AliasAnalysis] Document the AliasResult enum. NFC.
1 parent 3be2be5 commit f6d6f31

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

include/swift/SILAnalysis/AliasAnalysis.h

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,24 @@ class SideEffectAnalysis;
2828
/// needed since we do not have an "analysis" infrastructure.
2929
class AliasAnalysis : public SILAnalysis {
3030
public:
31-
/// The result of an alias query. This is based off of LLVM's alias
32-
/// analysis so see LLVM's documentation for more information.
31+
32+
/// This enum describes the different kinds of aliasing relations between
33+
/// pointers.
34+
///
35+
/// NoAlias: There is never dependence between memory referenced by the two
36+
/// pointers. Example: Two pointers pointing to non-overlapping
37+
/// memory ranges.
38+
///
39+
/// MayAlias: Two pointers might refer to the same memory location.
40+
///
41+
///
42+
/// PartialAlias: The two memory locations are known to be overlapping
43+
/// but do not start at the same address.
44+
///
45+
///
46+
/// MustAlias: The two memory locations always start at exactly the same
47+
/// location. The pointers are equal.
3348
///
34-
/// FIXME: PartialAlias?
3549
enum class AliasResult : unsigned {
3650
NoAlias=0, ///< The two values have no dependencies on each
3751
/// other.

0 commit comments

Comments
 (0)