[LLVMdev] PROPOSAL: struct-access-path aware TBAA

Manman Ren mren at apple.com
Tue Mar 12 10:13:42 PDT 2013


On Mar 12, 2013, at 8:22 AM, Krzysztof Parzyszek wrote:

> What cases does this proposal solve that the current analyses don't?  Do you have a motivating example?

Given
  struct A {
    int x;
    int y;
  };
  struct B {
    A a;
    int z;
  };
  struct C {
    B b1;
    B b2;
  };
  struct D {
    C c;
  };

with struct-access-path aware TBAA, C::b1.a.x does not alias with D::c.b2.a.x.
without it, the 2 scalar accesses can alias since both have int type.

Manman
> 
> -Krzysztof
> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation




More information about the llvm-dev mailing list