diff options
author | Siddharth Bhat <siddu.druid@gmail.com> | 2017-08-01 10:45:41 +0000 |
---|---|---|
committer | Siddharth Bhat <siddu.druid@gmail.com> | 2017-08-01 10:45:41 +0000 |
commit | 4d5820d17100dbd244980de768fceab5325d3505 (patch) | |
tree | 99fd43ddb832a17885df42f2173671d940b99640 | |
parent | d18b019193c0c998adbfedb12eec463411c0d95e (diff) | |
download | bcm5719-llvm-4d5820d17100dbd244980de768fceab5325d3505.tar.gz bcm5719-llvm-4d5820d17100dbd244980de768fceab5325d3505.zip |
[NFC] [PPCGCodeGeneration] Convert GPUNodeBuilder::getGridSizes to isl++.
llvm-svn: 309671
-rw-r--r-- | polly/lib/CodeGen/PPCGCodeGeneration.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp index 69bc26042aa..bf4f66fcd1d 100644 --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp @@ -1481,16 +1481,18 @@ void GPUNodeBuilder::clearLoops(Function *F) { std::tuple<Value *, Value *> GPUNodeBuilder::getGridSizes(ppcg_kernel *Kernel) { std::vector<Value *> Sizes; - isl_ast_build *Context = isl_ast_build_from_context(S.getContext()); + isl::ast_build Context = + isl::ast_build::from_context(isl::manage(S.getContext())); + isl::multi_pw_aff GridSizePwAffs = + isl::manage(isl_multi_pw_aff_copy(Kernel->grid_size)); for (long i = 0; i < Kernel->n_grid; i++) { - isl_pw_aff *Size = isl_multi_pw_aff_get_pw_aff(Kernel->grid_size, i); - isl_ast_expr *GridSize = isl_ast_build_expr_from_pw_aff(Context, Size); - Value *Res = ExprBuilder.create(GridSize); + isl::pw_aff Size = GridSizePwAffs.get_pw_aff(i); + isl::ast_expr GridSize = Context.expr_from(Size); + Value *Res = ExprBuilder.create(GridSize.release()); Res = Builder.CreateTrunc(Res, Builder.getInt32Ty()); Sizes.push_back(Res); } - isl_ast_build_free(Context); for (long i = Kernel->n_grid; i < 3; i++) Sizes.push_back(ConstantInt::get(Builder.getInt32Ty(), 1)); |