diff options
| author | Roman Gareev <gareevroman@gmail.com> | 2016-07-30 09:25:51 +0000 |
|---|---|---|
| committer | Roman Gareev <gareevroman@gmail.com> | 2016-07-30 09:25:51 +0000 |
| commit | d7754a1245ea5462d50649252b10c21ec13c2fc2 (patch) | |
| tree | 6011c715888fc8765098ea578eff3aa3a75085fc /polly/lib/CodeGen/PPCGCodeGeneration.cpp | |
| parent | 5d304b2456afba562855a692a5ea4d10cc5da9e7 (diff) | |
| download | bcm5719-llvm-d7754a1245ea5462d50649252b10c21ec13c2fc2.tar.gz bcm5719-llvm-d7754a1245ea5462d50649252b10c21ec13c2fc2.zip | |
Extend the jscop interface to allow the user to declare new arrays and to reference these arrays from access expressions
Extend the jscop interface to allow the user to export arrays. It is required
that already existing arrays of the list of arrays correspond to arrays
of the SCoP. Each array that is appended to the list will be newly created.
Furthermore, we allow the user to modify access expressions to reference
any array in case it has the same element type.
Reviewed-by: Tobias Grosser <tobias@grosser.es>
Differential Revision: https://reviews.llvm.org/D22828
llvm-svn: 277263
Diffstat (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp')
| -rw-r--r-- | polly/lib/CodeGen/PPCGCodeGeneration.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp index 955aaac08b4..db32ad40f8a 100644 --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp @@ -794,7 +794,7 @@ SetVector<Value *> GPUNodeBuilder::getReferencesInKernel(ppcg_kernel *Kernel) { findValues(Expr, SE, SubtreeValues); for (auto &SAI : S.arrays()) - SubtreeValues.remove(SAI.second->getBasePtr()); + SubtreeValues.remove(SAI->getBasePtr()); isl_space *Space = S.getParamSpace(); for (long i = 0; i < isl_space_dim(Space, isl_dim_param); i++) { @@ -1379,7 +1379,7 @@ public: } for (auto &Array : S->arrays()) { - auto Id = Array.second->getBasePtrId(); + auto Id = Array->getBasePtrId(); Names = isl_id_to_ast_expr_set(Names, Id, isl_ast_expr_copy(Zero)); } @@ -1550,9 +1550,7 @@ public: /// @param PPCGProg The program to compute the arrays for. void createArrays(gpu_prog *PPCGProg) { int i = 0; - for (auto &Element : S->arrays()) { - ScopArrayInfo *Array = Element.second.get(); - + for (auto &Array : S->arrays()) { std::string TypeName; raw_string_ostream OS(TypeName); @@ -1595,8 +1593,7 @@ public: isl_union_map *getArrayIdentity() { isl_union_map *Maps = isl_union_map_empty(S->getParamSpace()); - for (auto &Item : S->arrays()) { - ScopArrayInfo *Array = Item.second.get(); + for (auto &Array : S->arrays()) { isl_space *Space = Array->getSpace(); Space = isl_space_map_from_set(Space); isl_map *Identity = isl_map_identity(Space); |

