[PATCH] D22036: [polly] Add accelerator code generation pass sceleton
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 04:47:23 PDT 2016
grosser added a comment.
In http://reviews.llvm.org/D22036#475020, @Meinersbur wrote:
> Title: "sceleton" -> "skeleton" and missing "[Polly]".
> `PPCGCodeGenerationPass` sounds like it would invoke PPCG. I'd remove PPCG from the name, keeping only ACC.
It will, internally. If you prefer, I can still rename this pass to AcceleratorCodeGenerationPass.
> Any chance to make PPCGCodeGenerationPass an alternative to the optimizer pass, or even merge it, such that the CodeGeneration would see what it has been optimized and generate the relevant code, just like OpenMP code generation. This would avoid copy&paste code duplication.
As we use PPCG it is difficult to split out the dependence analysis and scheduling changes, as both are inter-tangled and especially the GPU specific scheduling that is necessary is very different to the CPU specific schedule optimizations we perform today in Polly.
My current proposal would be to first integrate accelerator code generation as an independent transformation and -- after it has proven to work reliably -- start with integrating CPU and GPU mappings. I did some early experiments on this and it seems performing such an integration on the schedule tree level is feasible. However, it will be a lot easier to discuss when we have the relevant code working next to each other in the same repository.
Regarding code duplication, I expect little code duplication. Most of the code generation is in IslNodeGenerator / IslExprGenerator / ...
and we will just call these classes when the need arises. There will be two scheduler implementations Polly's CPU focused scheduler as well as PPCG's GPU focused scheduling strategies. As said earlier, I would prefer to wait with merging them until we have a stable code base we can use for experiments and testing.
More information about the llvm-commits