[llvm-commits] [polly] r152912 - /polly/trunk/lib/Support/SCEVValidator.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Fri Mar 16 03:12:37 PDT 2012
Author: grosser
Date: Fri Mar 16 05:12:37 2012
New Revision: 152912
URL: http://llvm.org/viewvc/llvm-project?rev=152912&view=rev
Log:
ScevValidator: Add printer for ValidatorResult
Modified:
polly/trunk/lib/Support/SCEVValidator.cpp
Modified: polly/trunk/lib/Support/SCEVValidator.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/SCEVValidator.cpp?rev=152912&r1=152911&r2=152912&view=diff
==============================================================================
--- polly/trunk/lib/Support/SCEVValidator.cpp (original)
+++ polly/trunk/lib/Support/SCEVValidator.cpp Fri Mar 16 05:12:37 2012
@@ -99,8 +99,30 @@
Type = std::max(Type, ToMerge.Type);
addParamsFrom(ToMerge);
}
+
+ void print(raw_ostream &OS) {
+ switch (Type) {
+ case SCEVType::INT:
+ OS << "SCEVType::INT\n";
+ break;
+ case SCEVType::PARAM:
+ OS << "SCEVType::PARAM\n";
+ break;
+ case SCEVType::IV:
+ OS << "SCEVType::IV\n";
+ break;
+ case SCEVType::INVALID:
+ OS << "SCEVType::INVALID\n";
+ break;
+ }
+ }
};
+raw_ostream &operator<<(raw_ostream &OS, class ValidatorResult &VR) {
+ VR.print(OS);
+ return OS;
+}
+
/// Check if a SCEV is valid in a SCoP.
struct SCEVValidator
: public SCEVVisitor<SCEVValidator, class ValidatorResult> {
More information about the llvm-commits
mailing list