[PATCH] D94654: [SCEV] Do not cache comparison result upon reached max depth as "equivalence". PR48725
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 02:40:06 PST 2021
aqjune added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:860
const SCEV *&LHS = Ops[0], *&RHS = Ops[1];
if (CompareSCEVComplexity(EqCacheSCEV, EqCacheValue, LI, RHS, LHS, DT) < 0)
std::swap(LHS, RHS);
----------------
I see that the definition of Optional::operator< is as follows:
```
template <typename T>
constexpr bool operator<(const Optional<T> &X, const T &Y) {
return !X || *X < Y;
}
```
So, this will hold if CompareSCEVComplexity returns None as well. Is this okay?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94654/new/
https://reviews.llvm.org/D94654
More information about the llvm-commits
mailing list