diff options
author | Dan Gohman <gohman@apple.com> | 2010-12-10 19:38:58 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-12-10 19:38:58 +0000 |
commit | 4a34cbd2b9ba9efcdab4c4e656df2d7bd22e2604 (patch) | |
tree | 4c5ad19638f28025cc04dc1078775facb059c928 | |
parent | a92bac64cb75853c65a6146e015c2bf60c710869 (diff) | |
download | external_llvm-4a34cbd2b9ba9efcdab4c4e656df2d7bd22e2604.zip external_llvm-4a34cbd2b9ba9efcdab4c4e656df2d7bd22e2604.tar.gz external_llvm-4a34cbd2b9ba9efcdab4c4e656df2d7bd22e2604.tar.bz2 |
Introduce a new PartialAlias response for AliasAnalysis. For most
AliasAnalysis consumers, PartialAlias will be treated as MayAlias.
For AliasAnalysis chaining, MayAlias says "procede to the next analysis".
PartialAlias will be used to indicate that the query should terminate,
even though it didn't reach MustAlias or NoAlias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121507 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | docs/AliasAnalysis.html | 9 | ||||
-rw-r--r-- | include/llvm/Analysis/AliasAnalysis.h | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/docs/AliasAnalysis.html b/docs/AliasAnalysis.html index ad598c2..8fbb29f 100644 --- a/docs/AliasAnalysis.html +++ b/docs/AliasAnalysis.html @@ -188,7 +188,8 @@ that the accesses alias.</p> <div class="doc_text"> <p>The <tt>alias</tt> 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.</p> +input and returns MustAlias, PartialAlias, MayAlias, or NoAlias as +appropriate.</p> <p>Like all <tt>AliasAnalysis</tt> interfaces, the <tt>alias</tt> method requires that either the two pointer values be defined within the same function, or at @@ -215,8 +216,10 @@ and reallocation.</p> dependencies are ignored.</p> <p>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.</p> +same object.</p> + +<p>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.</p> <p>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 167371b..c218e05 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. |