Files
clang-p2996/clang/test/CodeGen/tbaa-array.cpp
Bruno De Fraine c3b8a15eab [CodeGen] Add TBAA struct path info for array members (#137719)
This enables the LLVM optimizer to view accesses to distinct struct
members as independent, also for array members. For example, the
following two stores no longer alias:

    struct S { int a[10]; int b; };
    void test(S *p, int i) {
      p->a[i] = ...;
      p->b = ...;
    }

Array members were already added to TBAA struct type nodes in commit
57493e29. Here, we extend a path tag for an array subscript expression.
2025-06-05 13:37:18 +02:00

3.0 KiB