Include the maximum trip count expression in ScalarEvolution's print output.
authorDan Gohman <gohman@apple.com>
Wed, 24 Jun 2009 00:33:16 +0000 (00:33 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 24 Jun 2009 00:33:16 +0000 (00:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74035 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index 6e5dfbb35ed78acfa73004be5c5d573ee4a21e03..60a6e9140c90ebc35467c9e0cef28e12e7d5024c 100644 (file)
@@ -4339,6 +4339,15 @@ static void PrintLoopInfo(raw_ostream &OS, ScalarEvolution *SE,
     OS << "Unpredictable backedge-taken count. ";
   }
 
+  OS << "\n";
+  OS << "Loop " << L->getHeader()->getName() << ": ";
+
+  if (!isa<SCEVCouldNotCompute>(SE->getMaxBackedgeTakenCount(L))) {
+    OS << "max backedge-taken count is " << *SE->getMaxBackedgeTakenCount(L);
+  } else {
+    OS << "Unpredictable max backedge-taken count. ";
+  }
+
   OS << "\n";
 }