diff options
| author | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2017-07-03 11:24:08 +0000 |
|---|---|---|
| committer | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2017-07-03 11:24:08 +0000 |
| commit | c47afcd9bbe5c5bca9dc1e1e064ea46bb2a83536 (patch) | |
| tree | e60d61609965cc9833222b875464f35cbc23aeab /openmp/runtime/src/kmp_taskdeps.cpp | |
| parent | 5c787ab346c3517f987d7f872a9e653d74d7a5df (diff) | |
| download | bcm5719-llvm-c47afcd9bbe5c5bca9dc1e1e064ea46bb2a83536.tar.gz bcm5719-llvm-c47afcd9bbe5c5bca9dc1e1e064ea46bb2a83536.zip | |
OpenMP RTL cleanup: eliminated warnings with -Wcast-qual.
Changes are: replaced C-style casts with cons_cast and reinterpret_cast;
type of several counters changed to signed; type of parameters of 32-bit and
64-bit AND and OR intrinsics changes to unsigned; changed files formatted
using clang-format version 3.8.1.
Differential Revision: https://reviews.llvm.org/D34759
llvm-svn: 307020
Diffstat (limited to 'openmp/runtime/src/kmp_taskdeps.cpp')
| -rw-r--r-- | openmp/runtime/src/kmp_taskdeps.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/openmp/runtime/src/kmp_taskdeps.cpp b/openmp/runtime/src/kmp_taskdeps.cpp index 1b4e86940ad..5499a568c02 100644 --- a/openmp/runtime/src/kmp_taskdeps.cpp +++ b/openmp/runtime/src/kmp_taskdeps.cpp @@ -46,7 +46,7 @@ static void __kmp_init_node(kmp_depnode_t *node) { } static inline kmp_depnode_t *__kmp_node_ref(kmp_depnode_t *node) { - KMP_TEST_THEN_INC32(&node->dn.nrefs); + KMP_TEST_THEN_INC32(CCAST(kmp_int32 *, &node->dn.nrefs)); return node; } @@ -54,7 +54,7 @@ static inline void __kmp_node_deref(kmp_info_t *thread, kmp_depnode_t *node) { if (!node) return; - kmp_int32 n = KMP_TEST_THEN_DEC32(&node->dn.nrefs) - 1; + kmp_int32 n = KMP_TEST_THEN_DEC32(CCAST(kmp_int32 *, &node->dn.nrefs)) - 1; if (n == 0) { KMP_ASSERT(node->dn.nrefs == 0); #if USE_FAST_MEMORY @@ -372,8 +372,10 @@ static bool __kmp_check_deps(kmp_int32 gtid, kmp_depnode_t *node, // Update predecessors and obtain current value to check if there are still // any outstandig dependences (some tasks may have finished while we processed // the dependences) - npredecessors = KMP_TEST_THEN_ADD32(&node->dn.npredecessors, npredecessors) + - npredecessors; + npredecessors = + KMP_TEST_THEN_ADD32(CCAST(kmp_int32 *, &node->dn.npredecessors), + npredecessors) + + npredecessors; KA_TRACE(20, ("__kmp_check_deps: T#%d found %d predecessors for task %p \n", gtid, npredecessors, taskdata)); @@ -410,8 +412,8 @@ void __kmp_release_deps(kmp_int32 gtid, kmp_taskdata_t *task) { for (kmp_depnode_list_t *p = node->dn.successors; p; p = next) { kmp_depnode_t *successor = p->node; kmp_int32 npredecessors = - KMP_TEST_THEN_DEC32(&successor->dn.npredecessors) - 1; - + KMP_TEST_THEN_DEC32(CCAST(kmp_int32 *, &successor->dn.npredecessors)) - + 1; // successor task can be NULL for wait_depends or because deps are still // being processed if (npredecessors == 0) { |

