BFI: Improve assertion message, since it's actually firing
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 6 Oct 2014 17:42:00 +0000 (17:42 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 6 Oct 2014 17:42:00 +0000 (17:42 +0000)
This assertion is firing because -loop-unroll is failing to preserve
-loop-info (see PR20987).  Improve it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219130 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BlockFrequencyInfoImpl.cpp

index 3203c371648d79822a56e192cc3572f85ef8469d..d132c23b0f6e4e52834ecc604816e7e4ea502039 100644 (file)
@@ -602,7 +602,8 @@ static void findIrreducibleHeaders(
       break;
     }
   }
-  assert(Headers.size() >= 2 && "Should be irreducible");
+  assert(Headers.size() >= 2 &&
+         "Expected irreducible CFG; -loop-info is likely invalid");
   if (Headers.size() == InSCC.size()) {
     // Every block is a header.
     std::sort(Headers.begin(), Headers.end());