forked from OSchip/llvm-project
[OpenMP] Remove 'unnecessary parentheses'
The variables in kmp_lock.cpp are really arrays of function pointers that return void or int, not pointers to functions that return void* or int*. The other changes are only cosmetic. Differential Revision: https://reviews.llvm.org/D65870 llvm-svn: 369002
This commit is contained in:
parent
fb72a03f85
commit
4d77e50e6e
|
@ -32,7 +32,6 @@ function(libomp_get_cxxflags cxxflags)
|
|||
libomp_append(flags_local -Wno-frame-address LIBOMP_HAVE_WNO_FRAME_ADDRESS_FLAG)
|
||||
libomp_append(flags_local -Wno-implicit-fallthrough LIBOMP_HAVE_WNO_IMPLICIT_FALLTHROUGH_FLAG)
|
||||
libomp_append(flags_local -Wno-missing-braces LIBOMP_HAVE_WNO_MISSING_BRACES_FLAG)
|
||||
libomp_append(flags_local -Wno-parentheses LIBOMP_HAVE_WNO_PARENTHESES_FLAG)
|
||||
libomp_append(flags_local -Wno-strict-aliasing LIBOMP_HAVE_WNO_STRICT_ALIASING_FLAG)
|
||||
libomp_append(flags_local -Wstringop-overflow=0 LIBOMP_HAVE_WSTRINGOP_OVERFLOW_FLAG)
|
||||
libomp_append(flags_local -Wno-stringop-truncation LIBOMP_HAVE_WNO_STRINGOP_TRUNCATION_FLAG)
|
||||
|
|
|
@ -53,7 +53,6 @@ check_cxx_compiler_flag(-Wno-covered-switch-default LIBOMP_HAVE_WNO_COVERED_SWIT
|
|||
check_cxx_compiler_flag(-Wno-frame-address LIBOMP_HAVE_WNO_FRAME_ADDRESS_FLAG)
|
||||
check_cxx_compiler_flag(-Wno-implicit-fallthrough LIBOMP_HAVE_WNO_IMPLICIT_FALLTHROUGH_FLAG)
|
||||
check_cxx_compiler_flag(-Wno-missing-braces LIBOMP_HAVE_WNO_MISSING_BRACES_FLAG)
|
||||
check_cxx_compiler_flag(-Wno-parentheses LIBOMP_HAVE_WNO_PARENTHESES_FLAG)
|
||||
check_cxx_compiler_flag(-Wno-strict-aliasing LIBOMP_HAVE_WNO_STRICT_ALIASING_FLAG)
|
||||
check_cxx_compiler_flag(-Wstringop-overflow=0 LIBOMP_HAVE_WSTRINGOP_OVERFLOW_FLAG)
|
||||
check_cxx_compiler_flag(-Wno-stringop-truncation LIBOMP_HAVE_WNO_STRINGOP_TRUNCATION_FLAG)
|
||||
|
|
|
@ -22,7 +22,7 @@ extern "C" {
|
|||
#endif // __cplusplus
|
||||
|
||||
#define MKLOC(loc, routine) \
|
||||
static ident_t(loc) = {0, KMP_IDENT_KMPC, 0, 0, ";unknown;unknown;0;0;;"};
|
||||
static ident_t loc = {0, KMP_IDENT_KMPC, 0, 0, ";unknown;unknown;0;0;;"};
|
||||
|
||||
#include "kmp_ftn_os.h"
|
||||
|
||||
|
|
|
@ -2943,10 +2943,10 @@ static int (*direct_test_check[])(kmp_dyna_lock_t *, kmp_int32) = {
|
|||
#undef expand
|
||||
|
||||
// Exposes only one set of jump tables (*lock or *lock_with_checks).
|
||||
void (*(*__kmp_direct_destroy))(kmp_dyna_lock_t *) = 0;
|
||||
int (*(*__kmp_direct_set))(kmp_dyna_lock_t *, kmp_int32) = 0;
|
||||
int (*(*__kmp_direct_unset))(kmp_dyna_lock_t *, kmp_int32) = 0;
|
||||
int (*(*__kmp_direct_test))(kmp_dyna_lock_t *, kmp_int32) = 0;
|
||||
void (**__kmp_direct_destroy)(kmp_dyna_lock_t *) = 0;
|
||||
int (**__kmp_direct_set)(kmp_dyna_lock_t *, kmp_int32) = 0;
|
||||
int (**__kmp_direct_unset)(kmp_dyna_lock_t *, kmp_int32) = 0;
|
||||
int (**__kmp_direct_test)(kmp_dyna_lock_t *, kmp_int32) = 0;
|
||||
|
||||
// Jump tables for the indirect lock functions
|
||||
#define expand(l, op) (void (*)(kmp_user_lock_p)) __kmp_##op##_##l##_##lock,
|
||||
|
@ -2993,10 +2993,10 @@ static int (*indirect_test_check[])(kmp_user_lock_p, kmp_int32) = {
|
|||
#undef expand
|
||||
|
||||
// Exposes only one jump tables (*lock or *lock_with_checks).
|
||||
void (*(*__kmp_indirect_destroy))(kmp_user_lock_p) = 0;
|
||||
int (*(*__kmp_indirect_set))(kmp_user_lock_p, kmp_int32) = 0;
|
||||
int (*(*__kmp_indirect_unset))(kmp_user_lock_p, kmp_int32) = 0;
|
||||
int (*(*__kmp_indirect_test))(kmp_user_lock_p, kmp_int32) = 0;
|
||||
void (**__kmp_indirect_destroy)(kmp_user_lock_p) = 0;
|
||||
int (**__kmp_indirect_set)(kmp_user_lock_p, kmp_int32) = 0;
|
||||
int (**__kmp_indirect_unset)(kmp_user_lock_p, kmp_int32) = 0;
|
||||
int (**__kmp_indirect_test)(kmp_user_lock_p, kmp_int32) = 0;
|
||||
|
||||
// Lock index table.
|
||||
kmp_indirect_lock_table_t __kmp_i_lock_table;
|
||||
|
|
|
@ -1122,18 +1122,18 @@ typedef struct {
|
|||
// Function tables for direct locks. Set/unset/test differentiate functions
|
||||
// with/without consistency checking.
|
||||
extern void (*__kmp_direct_init[])(kmp_dyna_lock_t *, kmp_dyna_lockseq_t);
|
||||
extern void (*(*__kmp_direct_destroy))(kmp_dyna_lock_t *);
|
||||
extern int (*(*__kmp_direct_set))(kmp_dyna_lock_t *, kmp_int32);
|
||||
extern int (*(*__kmp_direct_unset))(kmp_dyna_lock_t *, kmp_int32);
|
||||
extern int (*(*__kmp_direct_test))(kmp_dyna_lock_t *, kmp_int32);
|
||||
extern void (**__kmp_direct_destroy)(kmp_dyna_lock_t *);
|
||||
extern int (**__kmp_direct_set)(kmp_dyna_lock_t *, kmp_int32);
|
||||
extern int (**__kmp_direct_unset)(kmp_dyna_lock_t *, kmp_int32);
|
||||
extern int (**__kmp_direct_test)(kmp_dyna_lock_t *, kmp_int32);
|
||||
|
||||
// Function tables for indirect locks. Set/unset/test differentiate functions
|
||||
// with/withuot consistency checking.
|
||||
extern void (*__kmp_indirect_init[])(kmp_user_lock_p);
|
||||
extern void (*(*__kmp_indirect_destroy))(kmp_user_lock_p);
|
||||
extern int (*(*__kmp_indirect_set))(kmp_user_lock_p, kmp_int32);
|
||||
extern int (*(*__kmp_indirect_unset))(kmp_user_lock_p, kmp_int32);
|
||||
extern int (*(*__kmp_indirect_test))(kmp_user_lock_p, kmp_int32);
|
||||
extern void (**__kmp_indirect_destroy)(kmp_user_lock_p);
|
||||
extern int (**__kmp_indirect_set)(kmp_user_lock_p, kmp_int32);
|
||||
extern int (**__kmp_indirect_unset)(kmp_user_lock_p, kmp_int32);
|
||||
extern int (**__kmp_indirect_test)(kmp_user_lock_p, kmp_int32);
|
||||
|
||||
// Extracts direct lock tag from a user lock pointer
|
||||
#define KMP_EXTRACT_D_TAG(l) \
|
||||
|
|
|
@ -5661,7 +5661,7 @@ void __kmp_free_thread(kmp_info_t *this_th) {
|
|||
void *__kmp_launch_thread(kmp_info_t *this_thr) {
|
||||
int gtid = this_thr->th.th_info.ds.ds_gtid;
|
||||
/* void *stack_data;*/
|
||||
kmp_team_t *(*volatile pteam);
|
||||
kmp_team_t **volatile pteam;
|
||||
|
||||
KMP_MB();
|
||||
KA_TRACE(10, ("__kmp_launch_thread: T#%d start\n", gtid));
|
||||
|
@ -5705,7 +5705,7 @@ void *__kmp_launch_thread(kmp_info_t *this_thr) {
|
|||
}
|
||||
#endif
|
||||
|
||||
pteam = (kmp_team_t * (*))(&this_thr->th.th_team);
|
||||
pteam = &this_thr->th.th_team;
|
||||
|
||||
/* have we been allocated? */
|
||||
if (TCR_SYNC_PTR(*pteam) && !TCR_4(__kmp_global.g.g_done)) {
|
||||
|
|
Loading…
Reference in New Issue