diff options
author | Tobias Grosser <tobias@grosser.es> | 2015-10-25 13:48:40 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2015-10-25 13:48:40 +0000 |
commit | bf45e742540cd14e44a2a065d8b9a32b49e95957 (patch) | |
tree | 7d290c0c0865197bef40c7a83a1c482f237e3cce /polly/lib/Analysis/ScopDetectionDiagnostic.cpp | |
parent | 40ada57b7e217e6782f5dc16e45a8220b55d8c54 (diff) | |
download | bcm5719-llvm-bf45e742540cd14e44a2a065d8b9a32b49e95957.tar.gz bcm5719-llvm-bf45e742540cd14e44a2a065d8b9a32b49e95957.zip |
ScopDetect: Bail out for non-simple memory accesses
Volatile or atomic memory accesses are currently not supported. Neither did
we think about any special handling needed nor do we support the unknown
instructions the alias set tracker turns them into sometimes. Before this
patch, us not supporting unkown instructions in an alias set caused the
following assertion failures:
Assertion `AG.size() > 1 && "Alias groups should contain at least two accesses"'
failed
llvm-svn: 251234
Diffstat (limited to 'polly/lib/Analysis/ScopDetectionDiagnostic.cpp')
-rw-r--r-- | polly/lib/Analysis/ScopDetectionDiagnostic.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp index 1943dfc37f1..4eabfc9c9de 100644 --- a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp +++ b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp @@ -349,6 +349,29 @@ bool ReportFuncCall::classof(const RejectReason *RR) { } //===----------------------------------------------------------------------===// +// ReportNonSimpleMemoryAccess + +ReportNonSimpleMemoryAccess::ReportNonSimpleMemoryAccess(Instruction *Inst) + : ReportOther(rrkNonSimpleMemoryAccess), Inst(Inst) {} + +std::string ReportNonSimpleMemoryAccess::getMessage() const { + return "Non-simple memory access: " + *Inst; +} + +const DebugLoc &ReportNonSimpleMemoryAccess::getDebugLoc() const { + return Inst->getDebugLoc(); +} + +std::string ReportNonSimpleMemoryAccess::getEndUserMessage() const { + return "Volatile memory accesses or memory accesses for atomic types " + "are not supported."; +} + +bool ReportNonSimpleMemoryAccess::classof(const RejectReason *RR) { + return RR->getKind() == rrkNonSimpleMemoryAccess; +} + +//===----------------------------------------------------------------------===// // ReportAlias. ReportAlias::ReportAlias(Instruction *Inst, AliasSet &AS) |