forked from OSchip/llvm-project
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
This commit is contained in:
parent
a902ba6f1e
commit
b8d2644732
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue