diff options
| author | Michael Kruse <llvm@meinersbur.de> | 2015-12-13 19:35:26 +0000 |
|---|---|---|
| committer | Michael Kruse <llvm@meinersbur.de> | 2015-12-13 19:35:26 +0000 |
| commit | b8d2644732ab7609bd121a07edd72b46ea6ff0cc (patch) | |
| tree | 97dbebb12469bf9a95bae6483a0ad900cfe62e87 | |
| parent | a902ba6f1eb8ec7bcc651fc43c5b8ed9cd87f09d (diff) | |
| download | bcm5719-llvm-b8d2644732ab7609bd121a07edd72b46ea6ff0cc.tar.gz bcm5719-llvm-b8d2644732ab7609bd121a07edd72b46ea6ff0cc.zip | |
Print "null" for ISL objects that are nullptr
Use it to print "null" if a MemoryAccess's access relation is not
available instead of printing nothing.
Suggested-by: Johannes Doerfert
llvm-svn: 255466
| -rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 3 | ||||
| -rw-r--r-- | polly/lib/Support/GICHelper.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 9d7a4339a92..86a20234acc 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -747,8 +747,7 @@ void MemoryAccess::print(raw_ostream &OS) const { } OS << "[Reduction Type: " << getReductionType() << "] "; OS << "[Scalar: " << isImplicit() << "]\n"; - if (AccessRelation) - OS.indent(16) << getOriginalAccessRelationStr() << ";\n"; + OS.indent(16) << getOriginalAccessRelationStr() << ";\n"; if (hasNewAccessRelation()) OS.indent(11) << "new: " << getNewAccessRelationStr() << ";\n"; } diff --git a/polly/lib/Support/GICHelper.cpp b/polly/lib/Support/GICHelper.cpp index 28883187269..ac23e4c9a18 100644 --- a/polly/lib/Support/GICHelper.cpp +++ b/polly/lib/Support/GICHelper.cpp @@ -70,6 +70,8 @@ template <typename ISLTy, typename ISL_CTX_GETTER, typename ISL_PRINTER> static inline std::string stringFromIslObjInternal(__isl_keep ISLTy *isl_obj, ISL_CTX_GETTER ctx_getter_fn, ISL_PRINTER printer_fn) { + if (!isl_obj) + return "null"; isl_ctx *ctx = ctx_getter_fn(isl_obj); isl_printer *p = isl_printer_to_str(ctx); printer_fn(p, isl_obj); |

