WIP: Integrate Polly and make it available via `@polly` macro #16531
This is a first attempt to integrate the polyhedral optimizer Polly into Julia in the context of my GSoC project. Since (for now) it is not yet clear whether it's beneficial to turn on Polly by default, it adds a macro
I do not know how I can "automatically" test whether Polly is executed for a certain function or not, so for now I had to manually verify that Polly is invoked for a function when
Since these changes also regard the build process of Julia I added a build option
So to make the build a little more "user-friendly" it would be nice to have Polly be downloaded and built automatically which I'll try to solve next. Basically, this will require changing
Please feel free to post your thoughts and suggestions on this.
thanks for pushing this ahead. From the Polly side, the architecture of this patch looks right. It connects all of Polly to Julia, while being minimal-intrusive. With this, we can start to increase the coverage and work on first optimizations.
I am interested to hear what the Julia side thinks of this patch.
As far as testing goes, perhaps something like
function looporder1(A::Matrix) s = zero(eltype(A)) @inbounds for i = 1:size(A,1), j = 1:size(A,2) # deliberately in cache-inefficient order s += A[i,j] end end @polly function looporder2(A::Matrix) ... # same function body as above end
and then test that