X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FAliasAnalysis.rst;h=1cbaee703f30be47ff47ea1e3d9914d646addbce;hb=c7260209a8cf404c461483da8dee33fad84bbf18;hp=712d57d14b12b4398b7410bdd83c889cfa44a81d;hpb=a7aec400a7014edba1eeb53c582d3ab47178fe8d;p=oota-llvm.git diff --git a/docs/AliasAnalysis.rst b/docs/AliasAnalysis.rst index 712d57d14b1..1cbaee703f3 100644 --- a/docs/AliasAnalysis.rst +++ b/docs/AliasAnalysis.rst @@ -51,7 +51,7 @@ starting address and size, and function calls are represented as the actual get mod/ref information for arbitrary instructions. All ``AliasAnalysis`` interfaces require that in queries involving multiple -values, values which are not `constants `_ are all +values, values which are not :ref:`constants ` are all defined within the same function. Representation of Pointers @@ -111,7 +111,7 @@ 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 least one of -the values is a `constant `_. +the values is a :ref:`constant `. .. _Must, May, or No: @@ -126,7 +126,7 @@ used for reading memory. Another is when the memory is freed and reallocated between accesses through one pointer and accesses through the other --- in this case, there is a dependence, but it's mediated by the free and reallocation. -As an exception to this is with the `noalias `_ keyword; +As an exception to this is with the :ref:`noalias ` keyword; the "irrelevant" dependencies are ignored. The ``MayAlias`` response is used whenever the two pointers might refer to the @@ -246,6 +246,20 @@ analysis run method (``run`` for a ``Pass``, ``runOnFunction`` for a return false; } +Required methods to override +---------------------------- + +You must override the ``getAdjustedAnalysisPointer`` method on all subclasses +of ``AliasAnalysis``. An example implementation of this method would look like: + +.. code-block:: c++ + + void *getAdjustedAnalysisPointer(const void* ID) override { + if (ID == &AliasAnalysis::ID) + return (AliasAnalysis*)this; + return this; + } + Interfaces which may be specified ---------------------------------