diff options
author | Philip Reames <listmail@philipreames.com> | 2020-11-24 18:45:37 -0800 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2020-11-24 18:47:49 -0800 |
commit | 10ddb927c1c3ee6af0436c23f93fe1da6de7b99a (patch) | |
tree | c30bb706f535956a3305eab545741ed4cb4d961a /llvm/lib/Analysis/LoopAccessAnalysis.cpp | |
parent | 3d1149c6fe48cdab768b587e5531c31b6f42ee12 (diff) | |
download | llvm-10ddb927c1c3ee6af0436c23f93fe1da6de7b99a.zip llvm-10ddb927c1c3ee6af0436c23f93fe1da6de7b99a.tar.gz llvm-10ddb927c1c3ee6af0436c23f93fe1da6de7b99a.tar.bz2 |
[SCEV] Use isa<> pattern for testing for CouldNotCompute [NFC]
Some older code - and code copied from older code - still directly tested against the singelton result of SE::getCouldNotCompute. Using the isa<SCEVCouldNotCompute> form is both shorter, and more readable.
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 0bffa7d..78f63c6 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -1803,7 +1803,7 @@ bool LoopAccessInfo::canAnalyzeLoop() { // ScalarEvolution needs to be able to find the exit count. const SCEV *ExitCount = PSE->getBackedgeTakenCount(); - if (ExitCount == PSE->getSE()->getCouldNotCompute()) { + if (isa<SCEVCouldNotCompute>(ExitCount)) { recordAnalysis("CantComputeNumberOfIterations") << "could not determine number of loop iterations"; LLVM_DEBUG(dbgs() << "LAA: SCEV could not compute the loop exit count.\n"); |