2016-08-25 20:36:15 +08:00
|
|
|
add_custom_target(PollyUnitTests)
|
|
|
|
set_target_properties(PollyUnitTests PROPERTIES FOLDER "Polly")
|
|
|
|
|
|
|
|
# add_polly_unittest(test_dirname file1.cpp file2.cpp)
|
|
|
|
#
|
|
|
|
# Will compile the list of files together and link against Polly and its dependences.
|
|
|
|
function(add_polly_unittest test_name)
|
|
|
|
if(COMMAND add_unittest)
|
|
|
|
add_unittest(PollyUnitTests ${test_name} ${ARGN})
|
|
|
|
else()
|
2016-08-25 22:33:44 +08:00
|
|
|
add_executable(${test_name} EXCLUDE_FROM_ALL ${ARGN})
|
2016-08-25 20:36:15 +08:00
|
|
|
set_target_properties(${test_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
2017-04-28 00:13:03 +08:00
|
|
|
target_link_libraries(${test_name} gtest_main gtest)
|
2016-08-25 20:36:15 +08:00
|
|
|
add_dependencies(PollyUnitTests ${test_name})
|
|
|
|
|
|
|
|
set_property(TARGET ${test_name} PROPERTY FOLDER "Polly")
|
|
|
|
endif()
|
2017-04-28 00:13:03 +08:00
|
|
|
target_link_libraries(${test_name} Polly)
|
2016-08-25 20:36:15 +08:00
|
|
|
endfunction()
|
|
|
|
|
|
|
|
add_subdirectory(Isl)
|
Add -polly-flatten-schedule pass.
The -polly-flatten-schedule pass reduces the number of scattering
dimensions in its isl_union_map form to make them easier to understand.
It is not meant to be used in production, only for debugging and
regression tests.
To illustrate, how it can make sets simpler, here is a lifetime set
used computed by the porposed DeLICM pass without flattening:
{ Stmt_reduction_for[0, 4] -> [0, 2, o2, o3] : o2 < 0;
Stmt_reduction_for[0, 4] -> [0, 1, o2, o3] : o2 >= 5;
Stmt_reduction_for[0, 4] -> [0, 1, 4, o3] : o3 > 0;
Stmt_reduction_for[0, i1] -> [0, 1, i1, 1] : 0 <= i1 <= 3;
Stmt_reduction_for[0, 4] -> [0, 2, 0, o3] : o3 <= 0 }
And here the same lifetime for a semantically identical one-dimensional
schedule:
{ Stmt_reduction_for[0, i1] -> [2 + 3i1] : 0 <= i1 <= 4 }
Differential Revision: https://reviews.llvm.org/D24310
llvm-svn: 280948
2016-09-08 23:02:36 +08:00
|
|
|
add_subdirectory(Flatten)
|
2017-02-16 00:59:10 +08:00
|
|
|
add_subdirectory(DeLICM)
|
2017-05-23 19:28:50 +08:00
|
|
|
add_subdirectory(ScopPassManager)
|
2017-08-05 17:38:09 +08:00
|
|
|
add_subdirectory(ScheduleOptimizer)
|