[llvm-commits] [llvm] r166873 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Oct 27 04:36:07 PDT 2012
Author: d0k
Date: Sat Oct 27 06:36:07 2012
New Revision: 166873
URL: http://llvm.org/viewvc/llvm-project?rev=166873&view=rev
Log:
SCEV validator: Ignore CouldNotCompute/undef on both sides. This is mostly noise and blocks finding more severe bugs.
Modified:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=166873&r1=166872&r2=166873&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Sat Oct 27 06:36:07 2012
@@ -7005,15 +7005,18 @@
// Compare the stringified SCEVs. We don't care if undef backedgetaken count
// changes.
- // FIXME: We currently ignore SCEV changes towards CouldNotCompute. This
+ // FIXME: We currently ignore SCEV changes from/to CouldNotCompute. This
// means that a pass is buggy or SCEV has to learn a new pattern but is
// usually not harmful.
if (OldI->second != NewI->second &&
OldI->second.find("undef") == std::string::npos &&
+ NewI->second.find("undef") == std::string::npos &&
+ OldI->second != "***COULDNOTCOMPUTE***" &&
NewI->second != "***COULDNOTCOMPUTE***") {
- dbgs() << "SCEVValidator: SCEV for Loop '"
+ dbgs() << "SCEVValidator: SCEV for loop '"
<< OldI->first->getHeader()->getName()
- << "' from '" << OldI->second << "' to '" << NewI->second << "'!";
+ << "' changed from '" << OldI->second
+ << "' to '" << NewI->second << "'!\n";
std::abort();
}
}
More information about the llvm-commits
mailing list