[PATCH] D23854: [LoopAccessAnalysis] Recognize geps that include s/zexts as consecutive memory accesses.

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 07:49:59 PDT 2016


mssimpso added a comment.

The logic looks fine, but I'm wondering if it makes sense to add this functionality directly into SCEV? It might be beneficial to transformations other than SLP and LoopIdiom. What do you think?


================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:1103
@@ +1102,3 @@
+    APInt KnownOne(BitWidth, 0);
+    computeKnownBits(OpA, KnownZero, KnownOne, DL, 0, nullptr, OpA, DT);
+    KnownZero &= ~APInt::getHighBitsSet(BitWidth, 1);
----------------
It's probably not a big deal, but this part makes me wonder about compile-time a little. In SLP, for example, we can call isConsecutiveAccess in an N^2 algorithm (e.g., when we try and sort a set of stores). Is computeKNownBits smart about caching results or does it always traverse the expression tree?

It may be rare that we ever reach this code, though.


https://reviews.llvm.org/D23854





More information about the llvm-commits mailing list