summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/IslAst.cpp
diff options
context:
space:
mode:
authorSebastian Pop <spop@codeaurora.org>2012-12-21 07:27:17 +0000
committerSebastian Pop <spop@codeaurora.org>2012-12-21 07:27:17 +0000
commitab9ea13f641718ec241ac945a8858c577a63b4f3 (patch)
tree394fc1ceb769236699f3dba27e3c1b940379ae66 /polly/lib/CodeGen/IslAst.cpp
parenteb283143e2e86f4dad79b49f1bf93b647114b206 (diff)
downloadbcm5719-llvm-ab9ea13f641718ec241ac945a8858c577a63b4f3.tar.gz
bcm5719-llvm-ab9ea13f641718ec241ac945a8858c577a63b4f3.zip
avoid initializing twice
llvm-svn: 170854
Diffstat (limited to 'polly/lib/CodeGen/IslAst.cpp')
-rw-r--r--polly/lib/CodeGen/IslAst.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp
index e4f0992afa8..fe5da775eae 100644
--- a/polly/lib/CodeGen/IslAst.cpp
+++ b/polly/lib/CodeGen/IslAst.cpp
@@ -302,9 +302,12 @@ AtEachDomain(__isl_take isl_ast_node *Node,
Id = isl_id_set_free_user(Id, &freeIslAstUser);
}
- isl_map *Map = isl_map_from_union_map(isl_ast_build_get_schedule(Context));
- Info->PMA = isl_pw_multi_aff_from_map(isl_map_reverse(Map));
- Info->Context = isl_ast_build_copy(Context);
+ if (!Info->PMA) {
+ isl_map *Map = isl_map_from_union_map(isl_ast_build_get_schedule(Context));
+ Info->PMA = isl_pw_multi_aff_from_map(isl_map_reverse(Map));
+ }
+ if (!Info->Context)
+ Info->Context = isl_ast_build_copy(Context);
return isl_ast_node_set_annotation(Node, Id);
}
OpenPOWER on IntegriCloud