[polly] r255466 - Print "null" for ISL objects that are nullptr

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 13 11:35:16 PST 2015


THX!

On 12/13, Michael Kruse via llvm-commits wrote:
> Author: meinersbur
> Date: Sun Dec 13 13:35:26 2015
> New Revision: 255466
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=255466&view=rev
> Log:
> 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
> 
> Modified:
>     polly/trunk/lib/Analysis/ScopInfo.cpp
>     polly/trunk/lib/Support/GICHelper.cpp
> 
> Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=255466&r1=255465&r2=255466&view=diff
> ==============================================================================
> --- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
> +++ polly/trunk/lib/Analysis/ScopInfo.cpp Sun Dec 13 13:35:26 2015
> @@ -747,8 +747,7 @@ void MemoryAccess::print(raw_ostream &OS
>    }
>    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";
>  }
> 
> Modified: polly/trunk/lib/Support/GICHelper.cpp
> URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/GICHelper.cpp?rev=255466&r1=255465&r2=255466&view=diff
> ==============================================================================
> --- polly/trunk/lib/Support/GICHelper.cpp (original)
> +++ polly/trunk/lib/Support/GICHelper.cpp Sun Dec 13 13:35:26 2015
> @@ -70,6 +70,8 @@ template <typename ISLTy, typename ISL_C
>  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);
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

-- 

Johannes Doerfert
Researcher / PhD Student

Compiler Design Lab (Prof. Hack)
Saarland University, Computer Science
Building E1.3, Room 4.31

Tel. +49 (0)681 302-57521 : doerfert at cs.uni-saarland.de
Fax. +49 (0)681 302-3065  : http://www.cdl.uni-saarland.de/people/doerfert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151213/6dfdece7/attachment.sig>


More information about the llvm-commits mailing list