[PATCH] D29425: [SLP] Use SCEV to sort memory accesses
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 2 11:36:21 PST 2017
efriedma added inline comments.
================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:1071
+
+ // TODO: Do we really need the map, or can we just rely on the SCEV cache?
for (auto *Val : VL) {
----------------
The SCEV cache is reasonably fast, but it's obviously faster not to do a hashtable lookup at all.
================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:1095
+ SE.getMinusSCEV(Right.first, Left.first));
+ return (Diff && (Diff->getAPInt().isStrictlyPositive()));
});
----------------
std::sort requires your comparator to produce a strict weak ordering; otherwise, it has undefined behavior.
https://reviews.llvm.org/D29425
More information about the llvm-commits
mailing list