From 6f24d9d9eeb09f28a9620b7c338e8c9c9b3dcfd9 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Thu, 10 Nov 2011 12:47:21 +0000 Subject: [PATCH] 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 --- polly/lib/Analysis/ScopDetection.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index ddc6f70a2fb8..1c92702f74e2 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -241,22 +241,8 @@ bool ScopDetection::isValidMemoryAccess(Instruction &Inst, 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; }