Tobias Grosser
2013-Nov-19 11:07 UTC
[LLVMdev] proposed patch to default to isl-only polly
On 11/19/2013 08:50 PM, Jack Howarth wrote:> Tobias, > Can we add something like the following to polly 3.4? > > Index: CMakeLists.txt > ==================================================================> --- CMakeLists.txt (revision 195142) > +++ CMakeLists.txt (working copy) > @@ -81,9 +81,14 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT > > FIND_PACKAGE(Isl REQUIRED) > FIND_PACKAGE(Gmp REQUIRED) > -FIND_PACKAGE(Cloog) > FIND_PACKAGE(Pluto) > > +option(POLLY_USE_CLOOG "Build Polly with Cloog support" OFF) > +if (POLLY_USE_CLOOG) > + # Build Cloog support in Polly (default is ISL-only). > + FIND_PACKAGE(Cloog) > +endif(POLLY_USE_CLOOG)Hi Jack, thanks for writing a patch for your feature request. The patch itself looks good the way it is implemented. Though I wonder why it is needed. Polly only uses CLooG if available, so I assume you have a CLooG version installed, but you do not want to use it. What is the reason you do not want to use the installed CLooG version. Is the CLooG version outdated and Polly does not work with it? Or is there another reason for this? The reason the isl code generation is not yet default is because we do not yet support openmp code generation support for it. Would you be OK with installing Polly without OpenMP generation support? Cheers, Tobias
Tobias, Can we add something like the following to polly 3.4? Index: CMakeLists.txt ==================================================================--- CMakeLists.txt (revision 195142) +++ CMakeLists.txt (working copy) @@ -81,9 +81,14 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT FIND_PACKAGE(Isl REQUIRED) FIND_PACKAGE(Gmp REQUIRED) -FIND_PACKAGE(Cloog) FIND_PACKAGE(Pluto) +option(POLLY_USE_CLOOG "Build Polly with Cloog support" OFF) +if (POLLY_USE_CLOOG) + # Build Cloog support in Polly (default is ISL-only). + FIND_PACKAGE(Cloog) +endif(POLLY_USE_CLOOG) + option(POLLY_ENABLE_GPGPU_CODEGEN "Enable GPGPU code generation feature" OFF) if (POLLY_ENABLE_GPGPU_CODEGEN) # Do not require CUDA, as GPU code generation test cases can be run without I have tested this on x86_64-apple-darwin12 with cloog 0.18.1 and isl 0.12.1 installed and it works fine. The default build of Polly is isl-only as expected. % otool -L /sw/opt/llvm-3.4/lib/LLVMPolly.so /sw/opt/llvm-3.4/lib/LLVMPolly.so: /sw/lib/libisl.10.dylib (compatibility version 13.0.0, current version 13.1.0) /sw/lib/gmp5/libgmp.10.dylib (compatibility version 12.0.0, current version 12.3.0) /sw/lib/ncurses/libncurses.5.dylib (compatibility version 5.0.0, current version 5.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) [100%] Running polly regression tests Testing Time: 2.23s Expected Passes : 157 Expected Failures : 23 Unsupported Tests : 84 [100%] Built target check-polly Only when -DPOLLY_USE_CLOOG=ON is passed to cmake does Polly build against cloog as well. % otool -L /sw/opt/llvm-3.4/lib/LLVMPolly.so /sw/opt/llvm-3.4/lib/LLVMPolly.so: /sw/lib/libisl.10.dylib (compatibility version 13.0.0, current version 13.1.0) /sw/lib/gmp5/libgmp.10.dylib (compatibility version 12.0.0, current version 12.3.0) /sw/lib/libcloog-isl.4.dylib (compatibility version 5.0.0, current version 5.0.0) /sw/lib/ncurses/libncurses.5.dylib (compatibility version 5.0.0, current version 5.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) [100%] Running polly regression tests Testing Time: 2.98s Expected Passes : 233 Expected Failures : 23 Unsupported Tests : 8 [100%] Built target check-polly Thanks in advance with any help in getting a change like this in to polly 3.4. Jack -------------- next part -------------- Index: CMakeLists.txt ==================================================================--- CMakeLists.txt (revision 195142) +++ CMakeLists.txt (working copy) @@ -81,9 +81,14 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT FIND_PACKAGE(Isl REQUIRED) FIND_PACKAGE(Gmp REQUIRED) -FIND_PACKAGE(Cloog) FIND_PACKAGE(Pluto) +option(POLLY_USE_CLOOG "Build Polly with Cloog support" OFF) +if (POLLY_USE_CLOOG) + # Build Cloog support in Polly (default is ISL-only). + FIND_PACKAGE(Cloog) +endif(POLLY_USE_CLOOG) + option(POLLY_ENABLE_GPGPU_CODEGEN "Enable GPGPU code generation feature" OFF) if (POLLY_ENABLE_GPGPU_CODEGEN) # Do not require CUDA, as GPU code generation test cases can be run without
On Tue, Nov 19, 2013 at 12:07:18PM +0100, Tobias Grosser wrote:> On 11/19/2013 08:50 PM, Jack Howarth wrote: >> Tobias, >> Can we add something like the following to polly 3.4? >> >> Index: CMakeLists.txt >> ==================================================================>> --- CMakeLists.txt (revision 195142) >> +++ CMakeLists.txt (working copy) >> @@ -81,9 +81,14 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT >> >> FIND_PACKAGE(Isl REQUIRED) >> FIND_PACKAGE(Gmp REQUIRED) >> -FIND_PACKAGE(Cloog) >> FIND_PACKAGE(Pluto) >> >> +option(POLLY_USE_CLOOG "Build Polly with Cloog support" OFF) >> +if (POLLY_USE_CLOOG) >> + # Build Cloog support in Polly (default is ISL-only). >> + FIND_PACKAGE(Cloog) >> +endif(POLLY_USE_CLOOG) > > Hi Jack, > > thanks for writing a patch for your feature request. The patch itself > looks good the way it is implemented. Though I wonder why it is needed. > Polly only uses CLooG if available, so I assume you have a CLooG version > installed, but you do not want to use it. What is the reason you do not > want to use the installed CLooG version. Is the CLooG version outdated > and Polly does not work with it? Or is there another reason for this? > > The reason the isl code generation is not yet default is because we do > not yet support openmp code generation support for it. Would you be OK > with installing Polly without OpenMP generation support?Tobias, The idea is to have some control on whether Polly is built with cloog outside of crudely deinstalling the cloog headers and libraries each time Polly is built. If you don't want to default to ISL-only yet, this change would still be useful even if the default is switched to... option(POLLY_USE_CLOOG "Build Polly with Cloog support" ON) since users could still pass cmake... -DPOLLY_USE_CLOOG=OFF rather than deinstalling the cloog headers/libraries to achieve an ISL-only build of Polly. I am confused by your comments on OpenMP support. Is this support parallel and independent of the new OpenMP support from Intel? http://blog.llvm.org/2013/10/openmp-project.html My understanding was that this code hadn't been merged in for the llvm 3.4 release. Jack> > Cheers, > Tobias