[LLVMdev] TBAA: Propagating aliasing information to derived pointers
Eli Friedman
eli.friedman at gmail.com
Wed Jan 18 18:22:57 PST 2012
On Wed, Jan 18, 2012 at 6:13 PM, Johan Tibell <johan.tibell at gmail.com> wrote:
> Hi,
>
> While adding support for TBAA to GHC's LLVM backend, we ran into the
> following issue: given a pointer that we know has certain aliasing
> properties (e.g. it points to the stack, not the heap) we'd like to
>
> * annotate all loads and stores to that pointer with a TBAA type "stack", and
> * also annotate all loads and stores to pointers derived from that
> pointer as "stack".
>
> For example, given Sp, which is the GHC stack pointer, and this pseudo-code
>
> tmp = Sp + 4
> tmp2 = load tmp // should be marked as "stack"
>
> we'd like to not only annotate loads/stores to Sp as "stack" but also
> all loads/stores to tmp.
>
> Is this something that can be achieved within the current framework or
> should we propagate the pointer aliasing information ourselves?
In the current TBAA implementation, the marking only applies to the
given load; it doesn't give any special properties to the loaded
pointer.
-Eli
More information about the llvm-dev
mailing list