[llvm-commits] [polly] r144286 - /polly/trunk/lib/Analysis/ScopDetection.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Thu Nov 10 05:21:43 PST 2011
Author: grosser
Date: Thu Nov 10 07:21:43 2011
New Revision: 144286
URL: http://llvm.org/viewvc/llvm-project?rev=144286&view=rev
Log:
ScopDetection: Do not verify Aliasing
This does not work reliable and is probably not needed. I accidentally changed
this in this recent commit:
commit a0bcd63c6ffa81616cf8c6663a87588803f7d91c
Author: grosser <grosser at 91177308-0d34-0410-b5e6-96231b3b80d8>
Date: Thu Nov 10 12:47:21 2011 +0000
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.
git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@144284
Modified:
polly/trunk/lib/Analysis/ScopDetection.cpp
Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=144286&r1=144285&r2=144286&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Thu Nov 10 07:21:43 2011
@@ -88,9 +88,6 @@
"Number of bad regions for Scop: "\
DESC)
-#define STATSCOP(NAME); assert(!Context.Verifying && #NAME); \
- if (!Context.Verifying) ++Bad##NAME##ForScop;
-
#define INVALID(NAME, MESSAGE) \
do { \
std::string Buf; \
@@ -100,7 +97,23 @@
LastFailure = Buf; \
DEBUG(dbgs() << MESSAGE); \
DEBUG(dbgs() << "\n"); \
- STATSCOP(NAME); \
+ assert(!Context.Verifying && #NAME); \
+ if (!Context.Verifying) ++Bad##NAME##ForScop; \
+ return false; \
+ } while (0);
+
+
+#define INVALID_NOVERIFY(NAME, MESSAGE) \
+ do { \
+ std::string Buf; \
+ raw_string_ostream fmt(Buf); \
+ fmt << MESSAGE; \
+ fmt.flush(); \
+ LastFailure = Buf; \
+ DEBUG(dbgs() << MESSAGE); \
+ DEBUG(dbgs() << "\n"); \
+ /* DISABLED: assert(!Context.Verifying && #NAME); */ \
+ if (!Context.Verifying) ++Bad##NAME##ForScop; \
return false; \
} while (0);
@@ -245,8 +258,17 @@
AliasSet &AS =
Context.AST.getAliasSetForPointer(BaseValue, AliasAnalysis::UnknownSize,
Inst.getMetadata(LLVMContext::MD_tbaa));
+
+ // INVALID triggers an assertion in verifying mode, if it detects that a SCoP
+ // was detected by SCoP detection and that this SCoP was invalidated by a pass
+ // that stated it would preserve the SCoPs.
+ // We disable this check as the independent blocks pass may create memory
+ // references which seem to alias, if -basicaa is not available. They actually
+ // do not, but as we can not proof this without -basicaa we would fail. We
+ // disable this check to not cause irrelevant verification failures.
if (!AS.isMustAlias() && !IgnoreAliasing)
- INVALID(Alias, "Possible aliasing found for value: " << *BaseValue);
+ INVALID_NOVERIFY(Alias,
+ "Possible aliasing found for value: " << *BaseValue);
return true;
}
More information about the llvm-commits
mailing list