From 4a34cbd2b9ba9efcdab4c4e656df2d7bd22e2604 Mon Sep 17 00:00:00 2001
From: Dan Gohman
The alias method is the primary interface used to determine whether or not two memory objects alias each other. It takes two memory objects as -input and returns MustAlias, MayAlias, or NoAlias as appropriate.
+input and returns MustAlias, PartialAlias, MayAlias, or NoAlias as +appropriate.Like all AliasAnalysis interfaces, the alias method requires that either the two pointer values be defined within the same function, or at @@ -215,8 +216,10 @@ and reallocation.
dependencies are ignored.The MayAlias response is used whenever the two pointers might refer to the -same object. If the two memory objects overlap, but do not start at the same -location, return MayAlias.
+same object. + +The PartialAlias response is used when the two memory objects are known +to be overlapping in some way, but do not start at the same address.
The MustAlias response may only be returned if the two memory objects are guaranteed to always start at exactly the same location. A MustAlias response diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h index 167371b6b28..c218e057f02 100644 --- a/include/llvm/Analysis/AliasAnalysis.h +++ b/include/llvm/Analysis/AliasAnalysis.h @@ -150,8 +150,9 @@ public: /// enum AliasResult { NoAlias = 0, ///< No dependencies. - MayAlias = 1, ///< Anything goes. - MustAlias = 2 ///< Pointers are equal. + MayAlias, ///< Anything goes. + PartialAlias, ///< Pointers differ, but pointees overlap. + MustAlias ///< Pointers are equal. }; /// alias - The main low level interface to the alias analysis implementation.