[llvm-exegesis] Write out inconsistencies to a file.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Differential Revision: https://reviews.llvm.org/D47013

llvm-svn: 332608
diff --git a/llvm/tools/llvm-exegesis/lib/Analysis.cpp b/llvm/tools/llvm-exegesis/lib/Analysis.cpp
index 5b60925..a02ea29 100644
--- a/llvm/tools/llvm-exegesis/lib/Analysis.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Analysis.cpp
@@ -91,7 +91,9 @@
     MnemonicToOpcode_.emplace(InstrInfo_->getName(I), I);
 }
 
-llvm::Error Analysis::printClusters(llvm::raw_ostream &OS) const {
+template <>
+llvm::Error
+Analysis::run<Analysis::PrintClusters>(llvm::raw_ostream &OS) const {
   if (Clustering_.getPoints().empty())
     return llvm::Error::success();
 
@@ -133,8 +135,9 @@
   return PointsPerSchedClass;
 }
 
-llvm::Error
-Analysis::printSchedClassInconsistencies(llvm::raw_ostream &OS) const {
+template <>
+llvm::Error Analysis::run<Analysis::PrintSchedClassInconsistencies>(
+    llvm::raw_ostream &OS) const {
   // All the points in a scheduling class should be in the same cluster.
   // Print any scheduling class for which this is not the case.
   for (const auto &SchedClassAndPoints : makePointsPerSchedClass()) {
@@ -167,4 +170,9 @@
   return llvm::Error::success();
 }
 
+template llvm::Error
+Analysis::run<Analysis::PrintClusters>(llvm::raw_ostream &OS) const;
+template llvm::Error Analysis::run<Analysis::PrintSchedClassInconsistencies>(
+    llvm::raw_ostream &OS) const;
+
 } // namespace exegesis