[PATCH] D76210: [Attributor] AAReachability : use isPotentiallyReachable in isKnownReachable

Hideto Ueno via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 16 01:05:50 PDT 2020


uenoku added a comment.

  void use(int *);
  __attribute__((noinline)) static void f1(int * restrict p, int c1, int c2) {
    if (c1) {
      use(p);
    }
    if (!c2) {
      use(p);
    }
  }
  void f2(int * restrict p, int c) { f1(p, c, c); }

Could you add this example to test?
In this case, c1 and c2 are always same. Because of flow sensitivity,  the first callsite is not reachable to the second callsite. So %p is noalias at both callsites. It can't be deduced with `isPotentiallyReachable` so please add FIXME tag.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76210/new/

https://reviews.llvm.org/D76210





More information about the llvm-commits mailing list