From 6e9816fc4bb493dcdcd10135949fa901326bb150 Mon Sep 17 00:00:00 2001 From: Benjamin Segovia Date: Mon, 11 Jun 2012 19:47:53 +0000 Subject: [PATCH] Played around for register allocation --- utests/CMakeLists.txt | 10 ++++++---- utests/compiler_argument_structure_indirect.cpp | 1 - utests/compiler_unstructured_branch3.cpp | 4 ++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/utests/CMakeLists.txt b/utests/CMakeLists.txt index 04ecbfb..47ee908 100644 --- a/utests/CMakeLists.txt +++ b/utests/CMakeLists.txt @@ -7,8 +7,8 @@ ADD_LIBRARY(utests SHARED utest_file_map.cpp utest_assert.cpp utest.cpp -# need register allocation -#app_mandelbrot.cpp +# need register allocation (in SIMD16) +# app_mandelbrot.cpp compiler_write_only.cpp compiler_write_only_shorts.cpp compiler_write_only_bytes.cpp @@ -29,14 +29,16 @@ ADD_LIBRARY(utests SHARED compiler_lower_return0.cpp compiler_lower_return1.cpp compiler_lower_return2.cpp -# need register allocation +# unsupported indirect load of kernel arguments +# compiler_argument_structure_indirect.cpp + +# need register allocation (in SIMD16) #compiler_array.cpp #compiler_array0.cpp compiler_function_argument.cpp compiler_function_argument0.cpp compiler_function_argument1.cpp compiler_argument_structure.cpp) -#compiler_argument_structure_indirect.cpp) TARGET_LINK_LIBRARIES(utests cl m) ADD_EXECUTABLE(run utest_run.cpp) diff --git a/utests/compiler_argument_structure_indirect.cpp b/utests/compiler_argument_structure_indirect.cpp index 36a81e6..e572f81 100644 --- a/utests/compiler_argument_structure_indirect.cpp +++ b/utests/compiler_argument_structure_indirect.cpp @@ -46,4 +46,3 @@ void compiler_argument_structure_indirect(void) MAKE_UTEST_FROM_FUNCTION(compiler_argument_structure_indirect); - diff --git a/utests/compiler_unstructured_branch3.cpp b/utests/compiler_unstructured_branch3.cpp index be143d2..732bcf2 100644 --- a/utests/compiler_unstructured_branch3.cpp +++ b/utests/compiler_unstructured_branch3.cpp @@ -39,9 +39,11 @@ static void compiler_unstructured_branch3(void) locals[0] = 16; OCL_NDRANGE(1); + // First control flow OCL_MAP_BUFFER(0); OCL_MAP_BUFFER(1); + for (uint32_t i = 0; i < n; ++i) OCL_ASSERT(((int32_t*)buf_data[1])[i] == 2); @@ -56,6 +58,8 @@ static void compiler_unstructured_branch3(void) OCL_ASSERT(((uint32_t*)buf_data[1])[i] == 3); // Third control flow + OCL_MAP_BUFFER(0); + OCL_MAP_BUFFER(1); for (uint32_t i = 0; i < 8; ++i) ((int32_t*)buf_data[0])[i] = 2; for (uint32_t i = 8; i < n; ++i) ((int32_t*)buf_data[0])[i] = 0; OCL_UNMAP_BUFFER(0); -- 2.7.4