ScopDetect: Use INVALID macro to fail in case of aliasing

This simplifies the code and also makes the error message available to
the graphviz scop viewer.

llvm-svn: 144284
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index ddc6f70..1c92702 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -241,22 +241,8 @@
   AliasSet &AS =
     Context.AST.getAliasSetForPointer(BaseValue, AliasAnalysis::UnknownSize,
                                       Inst.getMetadata(LLVMContext::MD_tbaa));
-  if (!AS.isMustAlias()) {
-    DEBUG(dbgs() << "Bad pointer alias found:" << *BaseValue << "\nAS:\n" << AS);
-
-    // STATSCOP triggers an assertion if we are in verifying mode.
-    // This is generally good to check that we do not change the SCoP after we
-    // run the SCoP detection and consequently to ensure that we can still
-    // represent that SCoP. However, in case of aliasing this does not work.
-    // The independent blocks pass may create memory references which seem to
-    // alias, if -basicaa is not available. They actually do not. As we do not
-    // not know this and we would fail here if we verify it.
-    if (!Context.Verifying) {
-      STATSCOP(Alias);
-    }
-
-    return false;
-  }
+  if (!AS.isMustAlias())
+    INVALID(Alias, "Possible aliasing found for value: " << *BaseValue);
 
   return true;
 }