do not access Info when it is NULL

llvm-svn: 170853
This commit is contained in:
Sebastian Pop 2012-12-21 07:27:13 +00:00
parent 47a5ad0348
commit eb283143e2
1 changed files with 3 additions and 3 deletions

View File

@ -269,17 +269,17 @@ astBuildAfterFor(__isl_take isl_ast_node *Node,
return Node;
struct IslAstUser *Info = (struct IslAstUser *) isl_id_get_user(Id);
struct AstBuildUserInfo *BuildInfo = (struct AstBuildUserInfo *) User;
if (Info) {
if (Info->IsOutermostParallel)
BuildInfo->InParallelFor = 0;
if (!containsLoops(isl_ast_node_for_get_body(Node)))
if (astScheduleDimIsParallel(Build, BuildInfo->Deps))
Info->IsInnermostParallel = 1;
if (!Info->Context)
Info->Context = isl_ast_build_copy(Build);
}
if (!Info->Context)
Info->Context = isl_ast_build_copy(Build);
isl_id_free(Id);
return Node;
}