[PATCH] D108699: [LAA] Analyze pointers forked by a select

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 02:13:21 PDT 2022


fhahn added a comment.

In D108699#3591443 <https://reviews.llvm.org/D108699#3591443>, @huntergr wrote:

> Rebased on top of Florian's patch from https://reviews.llvm.org/D114487
>
> That patch has been reverted for now so builds will fail, but this should be pretty close to what we want once the base feature is back in.

Thanks, the patch has been relanded a while ago.

> I've cut the walker function down to only handle GEPs and selects for now; we can add more cases (and more tests) later.
>
> I've added tests to exercise the checks that exclude a given select or GEP from processing, as well as one for the recursion limit.
>
> I'll precommit the new tests before the next update on this patch.

Sounds good! I skimmed the current version and it looks like most comments should be addressed in the latest update. It might be good to mark them as done. One thing I couldn't spot in the latest version is a test for the potential `inbounds` issue mentioned inline.



================
Comment at: llvm/test/Analysis/LoopAccessAnalysis/forked-pointers.ll:1
-; RUN: opt -disable-output -passes='print-access-info' %s 2>&1 | FileCheck %s
+; RUN: opt -disable-output -opaque-pointers -passes='print-access-info' %s 2>&1 | FileCheck %s
+; RUN: opt -disable-output -opaque-pointers -passes='print-access-info' -max-forked-scev-depth=2 %s 2>&1 | FileCheck -check-prefix=RECURSE %s
----------------
It would be probably be good to convert the IR to use opaque pointers in a pre-commit, so `-opaque-pointers` is not needed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108699



More information about the llvm-commits mailing list