[llvm-commits] [llvm] r121507 - in /llvm/trunk: docs/AliasAnalysis.html include/llvm/Analysis/AliasAnalysis.h

Dan Gohman gohman at apple.com
Fri Dec 10 11:38:58 PST 2010


Author: djg
Date: Fri Dec 10 13:38:58 2010
New Revision: 121507

URL: http://llvm.org/viewvc/llvm-project?rev=121507&view=rev
Log:
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.

Modified:
    llvm/trunk/docs/AliasAnalysis.html
    llvm/trunk/include/llvm/Analysis/AliasAnalysis.h

Modified: llvm/trunk/docs/AliasAnalysis.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/AliasAnalysis.html?rev=121507&r1=121506&r2=121507&view=diff
==============================================================================
--- llvm/trunk/docs/AliasAnalysis.html (original)
+++ llvm/trunk/docs/AliasAnalysis.html Fri Dec 10 13:38:58 2010
@@ -188,7 +188,8 @@
 <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 @@
 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

Modified: llvm/trunk/include/llvm/Analysis/AliasAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/AliasAnalysis.h?rev=121507&r1=121506&r2=121507&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/AliasAnalysis.h (original)
+++ llvm/trunk/include/llvm/Analysis/AliasAnalysis.h Fri Dec 10 13:38:58 2010
@@ -150,8 +150,9 @@
   ///
   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.





More information about the llvm-commits mailing list