[Polly][Refactor] IslAst [5/7]

Tobias Grosser tobias at grosser.es
Tue Jul 29 01:27:42 PDT 2014


On 24/07/2014 18:12, Johannes Doerfert wrote:
> Patch No 5.
>
>
>
> Tobias, is this assumption "correct" or did I misunderstand the
> "visitDomain" function?
>
>
>
> --
>
>
>
> Johannes Doerfert
>
> Employee of Qualcomm Innovation Center, Inc.
>
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
> The Linux Foundation
>
>
>
>
>
> 0005-Refactor-Assume-no-annotations-when-visiting-new-dom.patch
>
>
>  From ded9552c3651633d55240e5d870c0b2b6542d659 Mon Sep 17 00:00:00 2001
> From: Johannes Doerfert<jdoerfert at codeaurora.org>
> Date: Wed, 16 Jul 2014 16:02:51 -0700
> Subject: [PATCH 5/7] [Refactor] Assume no annotations when visiting new domain
>
> ---
>   lib/CodeGen/IslAst.cpp | 20 +++++---------------
>   1 file changed, 5 insertions(+), 15 deletions(-)
>
> diff --git a/lib/CodeGen/IslAst.cpp b/lib/CodeGen/IslAst.cpp
> index f138f2c..4f88fac 100644
> --- a/lib/CodeGen/IslAst.cpp
> +++ b/lib/CodeGen/IslAst.cpp
> @@ -283,22 +283,12 @@ astBuildAfterFor(__isl_take isl_ast_node *Node, __isl_keep isl_ast_build *Build,
>   static __isl_give isl_ast_node *AtEachDomain(__isl_take isl_ast_node *Node,
>                                                __isl_keep isl_ast_build *Build,
>                                                void *User) {
> -  IslAstUserPayload *Info = nullptr;
> -  isl_id *Id = isl_ast_node_get_annotation(Node);
> -
> -  if (Id)
> -    Info = (IslAstUserPayload *)isl_id_get_user(Id);
> -
> -  if (!Info) {
> -    // Allocate annotations once: parallel for detection might have already
> -    // allocated the annotations for this node.

There was a comment that gives a reason why nodes may already be 
annotated. I don't believe that this reason is correct, as parallel for 
detection only annotates for-nodes but not user/domain nodes, but you 
should explain in the commit message why the reasoning here is wrong.

Otherwise, LGTM.

Cheers,
Tobias



More information about the llvm-commits mailing list