Compare commits
7
Commits
master
...
release_60
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5aa29cb3b | ||
|
|
3d85b5b4aa | ||
|
|
f1a69ba0a0 | ||
|
|
92d4fe5037 | ||
|
|
2d88abcec6 | ||
|
|
b1dec7c481 | ||
|
|
b3d58d09c4 |
@@ -1,11 +1,14 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(DetectTestCompiler C CXX)
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
function(write_compiler_information lang)
|
||||
set(information "${CMAKE_${lang}_COMPILER}")
|
||||
set(information "${information}\\;${CMAKE_${lang}_COMPILER_ID}")
|
||||
set(information "${information}\\;${CMAKE_${lang}_COMPILER_VERSION}")
|
||||
set(information "${information}\\;${OpenMP_${lang}_FLAGS}")
|
||||
set(information "${information}\\;${${lang}_FLAGS}")
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${lang}CompilerInformation.txt ${information})
|
||||
endfunction(write_compiler_information)
|
||||
|
||||
@@ -15,5 +18,22 @@ if (NOT OpenMP_Found)
|
||||
set(OpenMP_CXX_FLAGS "-fopenmp")
|
||||
endif()
|
||||
|
||||
set(C_FLAGS ${flags} ${OpenMP_C_FLAGS})
|
||||
set(CXX_FLAGS ${flags} ${OpenMP_CXX_FLAGS})
|
||||
|
||||
# TODO: Implement blockaddress in GlobalISel and remove this flag!
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
check_c_compiler_flag("-fno-experimental-isel" C_HAS_EXPERIMENTAL_ISEL_FLAG)
|
||||
check_cxx_compiler_flag("-fno-experimental-isel" CXX_HAS_EXPERIMENTAL_ISEL_FLAG)
|
||||
macro(add_experimental_isel_flag lang)
|
||||
if (${lang}_HAS_EXPERIMENTAL_ISEL_FLAG)
|
||||
set(${lang}_FLAGS "-fno-experimental-isel ${${lang}_FLAGS}")
|
||||
endif()
|
||||
endmacro(add_experimental_isel_flag)
|
||||
|
||||
add_experimental_isel_flag(C)
|
||||
add_experimental_isel_flag(CXX)
|
||||
endif()
|
||||
|
||||
write_compiler_information(C)
|
||||
write_compiler_information(CXX)
|
||||
|
||||
@@ -117,7 +117,8 @@ else()
|
||||
# Cannot use CLANG_VERSION because we are not guaranteed that this is already set.
|
||||
set(OPENMP_TEST_COMPILER_VERSION "${LLVM_VERSION}")
|
||||
set(OPENMP_TEST_COMPILER_VERSION_MAJOR "${LLVM_MAJOR_VERSION}")
|
||||
set(OPENMP_TEST_COMPILER_OPENMP_FLAGS "-fopenmp")
|
||||
# TODO: Implement blockaddress in GlobalISel and remove this flag!
|
||||
set(OPENMP_TEST_COMPILER_OPENMP_FLAGS "-fopenmp -fno-experimental-isel")
|
||||
endif()
|
||||
|
||||
# Function to set compiler features for use in lit.
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <climits>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
EXTERN int omp_get_num_devices(void) {
|
||||
RTLsMtx.lock();
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "rtl.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// adds a target shared library to the target execution image
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
#include "rtl.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <dlfcn.h>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
// List of all plugins that can support offloading.
|
||||
static const char *RTLNames[] = {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// Forward declarations.
|
||||
|
||||
@@ -4032,7 +4032,7 @@ void __kmpc_doacross_post(ident_t *loc, int gtid, long long *vec) {
|
||||
}
|
||||
|
||||
void __kmpc_doacross_fini(ident_t *loc, int gtid) {
|
||||
kmp_int64 num_done;
|
||||
kmp_int32 num_done;
|
||||
kmp_info_t *th = __kmp_threads[gtid];
|
||||
kmp_team_t *team = th->th.th_team;
|
||||
kmp_disp_t *pr_buf = th->th.th_dispatch;
|
||||
@@ -4042,7 +4042,7 @@ void __kmpc_doacross_fini(ident_t *loc, int gtid) {
|
||||
KA_TRACE(20, ("__kmpc_doacross_fini() exit: serialized team %p\n", team));
|
||||
return; // nothing to do
|
||||
}
|
||||
num_done = KMP_TEST_THEN_INC64((kmp_int64 *)pr_buf->th_doacross_info[1]) + 1;
|
||||
num_done = KMP_TEST_THEN_INC32((kmp_int32 *)pr_buf->th_doacross_info[1]) + 1;
|
||||
if (num_done == th->th.th_team_nproc) {
|
||||
// we are the last thread, need to free shared resources
|
||||
int idx = pr_buf->th_doacross_buf_idx - 1;
|
||||
@@ -4050,7 +4050,7 @@ void __kmpc_doacross_fini(ident_t *loc, int gtid) {
|
||||
&team->t.t_disp_buffer[idx % __kmp_dispatch_num_buffers];
|
||||
KMP_DEBUG_ASSERT(pr_buf->th_doacross_info[1] ==
|
||||
(kmp_int64)&sh_buf->doacross_num_done);
|
||||
KMP_DEBUG_ASSERT(num_done == (kmp_int64)sh_buf->doacross_num_done);
|
||||
KMP_DEBUG_ASSERT(num_done == sh_buf->doacross_num_done);
|
||||
KMP_DEBUG_ASSERT(idx == sh_buf->doacross_buf_idx);
|
||||
__kmp_thread_free(th, CCAST(kmp_uint32 *, sh_buf->doacross_flags));
|
||||
sh_buf->doacross_flags = NULL;
|
||||
|
||||
@@ -345,7 +345,7 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_MAX_THREADS)(void) {
|
||||
}
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
int FTN_STDCALL FTN_CONTROL_TOOL(uint64_t command, uint64_t modifier,
|
||||
int FTN_STDCALL FTN_CONTROL_TOOL(int command, int modifier,
|
||||
void *arg) {
|
||||
#if defined(KMP_STUB) || !OMPT_SUPPORT
|
||||
return -2;
|
||||
|
||||
@@ -10,7 +10,7 @@ int main()
|
||||
print_ids(0);
|
||||
|
||||
omp_lock_t lock;
|
||||
printf("%" PRIu64 ": &lock: %lli\n", ompt_get_thread_data()->value, (long long) &lock);
|
||||
printf("%" PRIu64 ": &lock: %" PRIu64 "\n", ompt_get_thread_data()->value, (uint64_t) &lock);
|
||||
omp_init_lock(&lock);
|
||||
print_current_address(1);
|
||||
omp_set_lock(&lock);
|
||||
|
||||
Reference in New Issue
Block a user