Index: openmp/trunk/runtime/.clang-format =================================================================== --- openmp/trunk/runtime/.clang-format +++ openmp/trunk/runtime/.clang-format @@ -2,90 +2,4 @@ BasedOnStyle: LLVM AlignTrailingComments: false SortIncludes: false ---- -# Language: Cpp -# AccessModifierOffset: -2 -# AlignAfterOpenBracket: Align -# AlignConsecutiveAssignments: false -# AlignConsecutiveDeclarations: false -# AlignEscapedNewlinesLeft: false -# AlignOperands: false -# AlignTrailingComments: false -# AllowAllParametersOfDeclarationOnNextLine: true -# AllowShortBlocksOnASingleLine: false -# AllowShortCaseLabelsOnASingleLine: false -# AllowShortFunctionsOnASingleLine: All -# AllowShortIfStatementsOnASingleLine: false -# AllowShortLoopsOnASingleLine: false -# AlwaysBreakAfterDefinitionReturnType: None -# AlwaysBreakAfterReturnType: None -# AlwaysBreakBeforeMultilineStrings: false -# AlwaysBreakTemplateDeclarations: false -# BinPackArguments: true -# BinPackParameters: true -# BraceWrapping: -# AfterClass: false -# AfterControlStatement: false -# AfterEnum: false -# AfterFunction: false -# AfterNamespace: false -# AfterObjCDeclaration: false -# AfterStruct: false -# AfterUnion: false -# BeforeCatch: false -# BeforeElse: false -# IndentBraces: false -# # BreakBeforeBinaryOperators: None -# BreakBeforeBraces: Attach -# BreakBeforeTernaryOperators: true -# BreakConstructorInitializersBeforeComma: false -# ColumnLimit: 80 -# CommentPragmas: '^ IWYU pragma:' -# ConstructorInitializerAllOnOneLineOrOnePerLine: false -# ConstructorInitializerIndentWidth: 4 -# ContinuationIndentWidth: 4 -# Cpp11BracedListStyle: true -# DerivePointerAlignment: false -# DisableFormat: true -# ExperimentalAutoDetectBinPacking: false -# ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -# IncludeCategories: -# - Regex: '^"(llvm|llvm-c|clang|clang-c)/' -# Priority: 2 -# - Regex: '^(<|"(gtest|isl|json)/)' -# Priority: 3 -# - Regex: '.*' -# Priority: 1 -# IndentCaseLabels: false -# IndentWidth: 2 -# IndentWrappedFunctionNames: false -# KeepEmptyLinesAtTheStartOfBlocks: false -# MacroBlockBegin: '' -# MacroBlockEnd: '' -# MaxEmptyLinesToKeep: 2 -# NamespaceIndentation: None -# ObjCBlockIndentWidth: 2 -# ObjCSpaceAfterProperty: false -# ObjCSpaceBeforeProtocolList: true -# PenaltyBreakBeforeFirstCallParameter: 19 -# PenaltyBreakComment: 300 -# PenaltyBreakFirstLessLess: 120 -# PenaltyBreakString: 1000 -# PenaltyExcessCharacter: 1000000 -# PenaltyReturnTypeOnItsOwnLine: 60 -# PointerAlignment: Right -# ReflowComments: true -# SpaceAfterCStyleCast: false -# SpaceBeforeAssignmentOperators: true -# SpaceBeforeParens: ControlStatements -# SpaceInEmptyParentheses: false -# SpacesBeforeTrailingComments: 1 -# SpacesInAngles: false -# SpacesInContainerLiterals: true -# SpacesInCStyleCastParentheses: false -# SpacesInParentheses: false -# SpacesInSquareBrackets: false -# Standard: Cpp11 -# TabWidth: 8 -# UseTab: Never ... Index: openmp/trunk/runtime/src/extractExternal.cpp =================================================================== --- openmp/trunk/runtime/src/extractExternal.cpp +++ openmp/trunk/runtime/src/extractExternal.cpp @@ -2,7 +2,6 @@ * extractExternal.cpp */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include #include #include Index: openmp/trunk/runtime/src/kmp.h =================================================================== --- openmp/trunk/runtime/src/kmp.h +++ openmp/trunk/runtime/src/kmp.h @@ -3,7 +3,6 @@ * kmp.h -- KPTS runtime header file. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -13,7 +12,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_H #define KMP_H Index: openmp/trunk/runtime/src/kmp_affinity.h =================================================================== --- openmp/trunk/runtime/src/kmp_affinity.h +++ openmp/trunk/runtime/src/kmp_affinity.h @@ -2,7 +2,6 @@ * kmp_affinity.h -- header for affinity management */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_AFFINITY_H #define KMP_AFFINITY_H Index: openmp/trunk/runtime/src/kmp_affinity.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_affinity.cpp +++ openmp/trunk/runtime/src/kmp_affinity.cpp @@ -2,7 +2,6 @@ * kmp_affinity.cpp -- affinity management */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_affinity.h" #include "kmp_i18n.h" @@ -25,7 +23,6 @@ void __kmp_cleanup_hierarchy() { machine_hierarchy.fini(); } - void __kmp_get_hierarchy(kmp_uint32 nproc, kmp_bstate_t *thr_bar) { kmp_uint32 depth; // The test below is true if affinity is available, but set to "none". Need to Index: openmp/trunk/runtime/src/kmp_alloc.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_alloc.cpp +++ openmp/trunk/runtime/src/kmp_alloc.cpp @@ -2,7 +2,6 @@ * kmp_alloc.cpp -- private/shared dynamic memory allocation and management */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_io.h" #include "kmp_wrapper_malloc.h" Index: openmp/trunk/runtime/src/kmp_atomic.h =================================================================== --- openmp/trunk/runtime/src/kmp_atomic.h +++ openmp/trunk/runtime/src/kmp_atomic.h @@ -2,7 +2,6 @@ * kmp_atomic.h - ATOMIC header file */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_ATOMIC_H #define KMP_ATOMIC_H Index: openmp/trunk/runtime/src/kmp_atomic.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_atomic.cpp +++ openmp/trunk/runtime/src/kmp_atomic.cpp @@ -2,7 +2,6 @@ * kmp_atomic.cpp -- ATOMIC implementation routines */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp_atomic.h" #include "kmp.h" // TRUE, asm routines prototypes Index: openmp/trunk/runtime/src/kmp_barrier.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_barrier.cpp +++ openmp/trunk/runtime/src/kmp_barrier.cpp @@ -2,7 +2,6 @@ * kmp_barrier.cpp */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,14 +11,12 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_wait_release.h" #include "kmp_itt.h" #include "kmp_os.h" #include "kmp_stats.h" - #if KMP_MIC #include #define USE_NGO_STORES 1 @@ -87,8 +84,7 @@ int nproc = this_thr->th.th_team_nproc; int i; // Don't have to worry about sleep bit here or atomic since team setting - kmp_uint64 new_state = - team_bar->b_arrived + KMP_BARRIER_STATE_BUMP; + kmp_uint64 new_state = team_bar->b_arrived + KMP_BARRIER_STATE_BUMP; // Collect all the worker team member threads. for (i = 1; i < nproc; ++i) { Index: openmp/trunk/runtime/src/kmp_cancel.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_cancel.cpp +++ openmp/trunk/runtime/src/kmp_cancel.cpp @@ -8,7 +8,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_i18n.h" #include "kmp_io.h" Index: openmp/trunk/runtime/src/kmp_csupport.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_csupport.cpp +++ openmp/trunk/runtime/src/kmp_csupport.cpp @@ -2,7 +2,6 @@ * kmp_csupport.cpp -- kfront linkage support for OpenMP. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "omp.h" /* extern "C" declarations of user-visible routines */ #include "kmp.h" #include "kmp_error.h" Index: openmp/trunk/runtime/src/kmp_debug.h =================================================================== --- openmp/trunk/runtime/src/kmp_debug.h +++ openmp/trunk/runtime/src/kmp_debug.h @@ -2,7 +2,6 @@ * kmp_debug.h -- debug / assertion code for Assure library */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_DEBUG_H #define KMP_DEBUG_H Index: openmp/trunk/runtime/src/kmp_debug.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_debug.cpp +++ openmp/trunk/runtime/src/kmp_debug.cpp @@ -2,7 +2,6 @@ * kmp_debug.cpp -- debug utilities for the Guide library */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_debug.h" /* really necessary? */ #include "kmp_i18n.h" Index: openmp/trunk/runtime/src/kmp_debugger.h =================================================================== --- openmp/trunk/runtime/src/kmp_debugger.h +++ openmp/trunk/runtime/src/kmp_debugger.h @@ -3,7 +3,6 @@ * kmp_debugger.h -- debugger support. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -13,7 +12,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_DEBUGGER_H #define KMP_DEBUGGER_H Index: openmp/trunk/runtime/src/kmp_debugger.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_debugger.cpp +++ openmp/trunk/runtime/src/kmp_debugger.cpp @@ -3,7 +3,6 @@ * kmp_debugger.cpp -- debugger support. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -13,7 +12,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_lock.h" #include "kmp_omp.h" Index: openmp/trunk/runtime/src/kmp_dispatch.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_dispatch.cpp +++ openmp/trunk/runtime/src/kmp_dispatch.cpp @@ -2,7 +2,6 @@ * kmp_dispatch.cpp: dynamic scheduling - iteration initialization and dispatch. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - /* Dynamic scheduling initialization and dispatch. * * NOTE: __kmp_nth is a constant inside of any dispatch loop, however @@ -1978,8 +1976,8 @@ pr->u.p.parm2) { // compare with K*nproc*(chunk+1), K=2 by default // use dynamic-style shcedule // atomically inrement iterations, get old value - init = test_then_add( - RCAST(volatile ST *, &sh->u.s.iteration), (ST)chunkspec); + init = test_then_add(RCAST(volatile ST *, &sh->u.s.iteration), + (ST)chunkspec); remaining = trip - init; if (remaining <= 0) { status = 0; // all iterations got by other threads @@ -2057,8 +2055,8 @@ if ((T)remaining < pr->u.p.parm2) { // use dynamic-style shcedule // atomically inrement iterations, get old value - init = test_then_add( - RCAST(volatile ST *, &sh->u.s.iteration), (ST)chunk); + init = test_then_add(RCAST(volatile ST *, &sh->u.s.iteration), + (ST)chunk); remaining = trip - init; if (remaining <= 0) { status = 0; // all iterations got by other threads Index: openmp/trunk/runtime/src/kmp_environment.h =================================================================== --- openmp/trunk/runtime/src/kmp_environment.h +++ openmp/trunk/runtime/src/kmp_environment.h @@ -2,7 +2,6 @@ * kmp_environment.h -- Handle environment varoiables OS-independently. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_ENVIRONMENT_H #define KMP_ENVIRONMENT_H Index: openmp/trunk/runtime/src/kmp_environment.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_environment.cpp +++ openmp/trunk/runtime/src/kmp_environment.cpp @@ -2,7 +2,6 @@ * kmp_environment.cpp -- Handle environment variables OS-independently. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - /* We use GetEnvironmentVariable for Windows* OS instead of getenv because the act of loading a DLL on Windows* OS makes any user-set environment variables (i.e. with putenv()) unavailable. getenv() apparently gets a clean copy of Index: openmp/trunk/runtime/src/kmp_error.h =================================================================== --- openmp/trunk/runtime/src/kmp_error.h +++ openmp/trunk/runtime/src/kmp_error.h @@ -2,7 +2,6 @@ * kmp_error.h -- PTS functions for error checking at runtime. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_ERROR_H #define KMP_ERROR_H Index: openmp/trunk/runtime/src/kmp_error.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_error.cpp +++ openmp/trunk/runtime/src/kmp_error.cpp @@ -2,7 +2,6 @@ * kmp_error.cpp -- KPTS functions for error checking at runtime */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_error.h" #include "kmp_i18n.h" Index: openmp/trunk/runtime/src/kmp_ftn_cdecl.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_ftn_cdecl.cpp +++ openmp/trunk/runtime/src/kmp_ftn_cdecl.cpp @@ -2,7 +2,6 @@ * kmp_ftn_cdecl.cpp -- Fortran __cdecl linkage support for OpenMP. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_affinity.h" Index: openmp/trunk/runtime/src/kmp_ftn_entry.h =================================================================== --- openmp/trunk/runtime/src/kmp_ftn_entry.h +++ openmp/trunk/runtime/src/kmp_ftn_entry.h @@ -2,7 +2,6 @@ * kmp_ftn_entry.h -- Fortran entry linkage support for OpenMP. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef FTN_STDCALL #error The support file kmp_ftn_entry.h should not be compiled by itself. #endif @@ -567,7 +565,6 @@ #if OMP_40_ENABLED - kmp_proc_bind_t FTN_STDCALL xexpand(FTN_GET_PROC_BIND)(void) { #ifdef KMP_STUB return __kmps_get_proc_bind(); @@ -1091,7 +1088,6 @@ /* ------------------------------------------------------------------------ */ - #if OMP_40_ENABLED /* returns the status of cancellation */ int FTN_STDCALL xexpand(FTN_GET_CANCELLATION)(void) { Index: openmp/trunk/runtime/src/kmp_ftn_extra.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_ftn_extra.cpp +++ openmp/trunk/runtime/src/kmp_ftn_extra.cpp @@ -2,7 +2,6 @@ * kmp_ftn_extra.cpp -- Fortran 'extra' linkage support for OpenMP. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_affinity.h" Index: openmp/trunk/runtime/src/kmp_ftn_os.h =================================================================== --- openmp/trunk/runtime/src/kmp_ftn_os.h +++ openmp/trunk/runtime/src/kmp_ftn_os.h @@ -2,7 +2,6 @@ * kmp_ftn_os.h -- KPTS Fortran defines header file. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_FTN_OS_H #define KMP_FTN_OS_H @@ -228,7 +226,6 @@ #define FTN_IS_INITIAL_DEVICE omp_is_initial_device_ #endif - #if OMP_40_ENABLED #define FTN_GET_CANCELLATION omp_get_cancellation_ #define FTN_GET_CANCELLATION_STATUS kmp_get_cancellation_status_ @@ -347,7 +344,6 @@ #define FTN_IS_INITIAL_DEVICE OMP_IS_INITIAL_DEVICE #endif - #if OMP_40_ENABLED #define FTN_GET_CANCELLATION OMP_GET_CANCELLATION #define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS @@ -466,7 +462,6 @@ #define FTN_IS_INITIAL_DEVICE OMP_IS_INITIAL_DEVICE_ #endif - #if OMP_40_ENABLED #define FTN_GET_CANCELLATION OMP_GET_CANCELLATION_ #define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS_ Index: openmp/trunk/runtime/src/kmp_ftn_stdcall.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_ftn_stdcall.cpp +++ openmp/trunk/runtime/src/kmp_ftn_stdcall.cpp @@ -2,7 +2,6 @@ * kmp_ftn_stdcall.cpp -- Fortran __stdcall linkage support for OpenMP. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" // Note: This string is not printed when KMP_VERSION=1. Index: openmp/trunk/runtime/src/kmp_global.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_global.cpp +++ openmp/trunk/runtime/src/kmp_global.cpp @@ -2,7 +2,6 @@ * kmp_global.cpp -- KPTS global variables for runtime support library */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_affinity.h" @@ -127,7 +125,6 @@ int __kmp_allThreadsSpecified = 0; size_t __kmp_align_alloc = CACHE_LINE; - int __kmp_generate_warnings = kmp_warnings_low; int __kmp_reserve_warn = 0; int __kmp_xproc = 0; Index: openmp/trunk/runtime/src/kmp_gsupport.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_gsupport.cpp +++ openmp/trunk/runtime/src/kmp_gsupport.cpp @@ -2,7 +2,6 @@ * kmp_gsupport.cpp */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_atomic.h" Index: openmp/trunk/runtime/src/kmp_i18n.h =================================================================== --- openmp/trunk/runtime/src/kmp_i18n.h +++ openmp/trunk/runtime/src/kmp_i18n.h @@ -2,7 +2,6 @@ * kmp_i18n.h */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_I18N_H #define KMP_I18N_H Index: openmp/trunk/runtime/src/kmp_i18n.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_i18n.cpp +++ openmp/trunk/runtime/src/kmp_i18n.cpp @@ -2,7 +2,6 @@ * kmp_i18n.cpp */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp_i18n.h" #include "kmp.h" Index: openmp/trunk/runtime/src/kmp_import.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_import.cpp +++ openmp/trunk/runtime/src/kmp_import.cpp @@ -2,7 +2,6 @@ * kmp_import.cpp */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - /* Object generated from this source file is linked to Windows* OS DLL import library (libompmd.lib) only! It is not a part of regular static or dynamic OpenMP RTL. Any code that just needs to go in the libompmd.lib (but not in Index: openmp/trunk/runtime/src/kmp_io.h =================================================================== --- openmp/trunk/runtime/src/kmp_io.h +++ openmp/trunk/runtime/src/kmp_io.h @@ -2,7 +2,6 @@ * kmp_io.h -- RTL IO header file. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_IO_H #define KMP_IO_H Index: openmp/trunk/runtime/src/kmp_io.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_io.cpp +++ openmp/trunk/runtime/src/kmp_io.cpp @@ -2,7 +2,6 @@ * kmp_io.cpp -- RTL IO */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include #include #include Index: openmp/trunk/runtime/src/kmp_itt.h =================================================================== --- openmp/trunk/runtime/src/kmp_itt.h +++ openmp/trunk/runtime/src/kmp_itt.h @@ -3,7 +3,6 @@ * kmp_itt.h -- ITT Notify interface. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -13,7 +12,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_ITT_H #define KMP_ITT_H Index: openmp/trunk/runtime/src/kmp_itt.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_itt.cpp +++ openmp/trunk/runtime/src/kmp_itt.cpp @@ -5,7 +5,6 @@ * kmp_itt.cpp -- ITT Notify interface. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -15,7 +14,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp_itt.h" #if KMP_DEBUG Index: openmp/trunk/runtime/src/kmp_itt.inl =================================================================== --- openmp/trunk/runtime/src/kmp_itt.inl +++ openmp/trunk/runtime/src/kmp_itt.inl @@ -3,7 +3,6 @@ * kmp_itt.inl -- Inline functions of ITT Notify. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -13,7 +12,6 @@ // //===----------------------------------------------------------------------===// - // Inline function definitions. This file should be included into kmp_itt.h file // for production build (to let compliler inline functions) or into kmp_itt.c // file for debug build (to reduce the number of files to recompile and save Index: openmp/trunk/runtime/src/kmp_lock.h =================================================================== --- openmp/trunk/runtime/src/kmp_lock.h +++ openmp/trunk/runtime/src/kmp_lock.h @@ -2,7 +2,6 @@ * kmp_lock.h -- lock header file */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_LOCK_H #define KMP_LOCK_H Index: openmp/trunk/runtime/src/kmp_lock.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_lock.cpp +++ openmp/trunk/runtime/src/kmp_lock.cpp @@ -2,7 +2,6 @@ * kmp_lock.cpp -- lock-related functions */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include #include Index: openmp/trunk/runtime/src/kmp_omp.h =================================================================== --- openmp/trunk/runtime/src/kmp_omp.h +++ openmp/trunk/runtime/src/kmp_omp.h @@ -4,7 +4,6 @@ * This is for information about runtime library structures. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -14,7 +13,6 @@ // //===----------------------------------------------------------------------===// - /* THIS FILE SHOULD NOT BE MODIFIED IN IDB INTERFACE LIBRARY CODE It should instead be modified in the OpenMP runtime and copied to the interface library code. This way we can minimize the problems that this is Index: openmp/trunk/runtime/src/kmp_os.h =================================================================== --- openmp/trunk/runtime/src/kmp_os.h +++ openmp/trunk/runtime/src/kmp_os.h @@ -2,7 +2,6 @@ * kmp_os.h -- KPTS runtime header file. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_OS_H #define KMP_OS_H @@ -247,9 +245,9 @@ #include static inline int KMP_GET_PAGE_SIZE(void) { - SYSTEM_INFO si; - GetSystemInfo(&si); - return si.dwPageSize; + SYSTEM_INFO si; + GetSystemInfo(&si); + return si.dwPageSize; } #else #define KMP_GET_PAGE_SIZE() getpagesize() @@ -829,7 +827,6 @@ #define KMP_USE_BGET 1 #endif - // Switches for OSS builds #ifndef USE_SYSFS_INFO #define USE_SYSFS_INFO 0 Index: openmp/trunk/runtime/src/kmp_platform.h =================================================================== --- openmp/trunk/runtime/src/kmp_platform.h +++ openmp/trunk/runtime/src/kmp_platform.h @@ -2,7 +2,6 @@ * kmp_platform.h -- header for determining operating system and architecture */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_PLATFORM_H #define KMP_PLATFORM_H Index: openmp/trunk/runtime/src/kmp_runtime.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_runtime.cpp +++ openmp/trunk/runtime/src/kmp_runtime.cpp @@ -2,7 +2,6 @@ * kmp_runtime.cpp -- KPTS runtime support library */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_affinity.h" #include "kmp_atomic.h" @@ -1107,15 +1105,15 @@ __kmp_store_mxcsr(&mxcsr); mxcsr &= KMP_X86_MXCSR_MASK; -// There is no point looking at t_fp_control_saved here. -// If it is TRUE, we still have to update the values if they are different from -// those we now have. -// If it is FALSE we didn't save anything yet, but our objective is the same. We -// have to ensure that the values in the team are the same as those we have. -// So, this code achieves what we need whether or not t_fp_control_saved is -// true. By checking whether the value needs updating we avoid unnecessary -// writes that would put the cache-line into a written state, causing all -// threads in the team to have to read it again. + // There is no point looking at t_fp_control_saved here. + // If it is TRUE, we still have to update the values if they are different + // from those we now have. If it is FALSE we didn't save anything yet, but + // our objective is the same. We have to ensure that the values in the team + // are the same as those we have. + // So, this code achieves what we need whether or not t_fp_control_saved is + // true. By checking whether the value needs updating we avoid unnecessary + // writes that would put the cache-line into a written state, causing all + // threads in the team to have to read it again. KMP_CHECK_UPDATE(team->t.t_x87_fpu_control_word, x87_fpu_control_word); KMP_CHECK_UPDATE(team->t.t_mxcsr, mxcsr); // Although we don't use this value, other code in the runtime wants to know @@ -4676,12 +4674,12 @@ place++; } - KA_TRACE(100, ("__kmp_partition_places: spread: T#%d(%d:%d) place %d " - "partition = [%d,%d], __kmp_affinity_num_masks: %u\n", - __kmp_gtid_from_thread(team->t.t_threads[f]), - team->t.t_id, f, th->th.th_new_place, - th->th.th_first_place, th->th.th_last_place, - __kmp_affinity_num_masks)); + KA_TRACE(100, + ("__kmp_partition_places: spread: T#%d(%d:%d) place %d " + "partition = [%d,%d], __kmp_affinity_num_masks: %u\n", + __kmp_gtid_from_thread(team->t.t_threads[f]), team->t.t_id, + f, th->th.th_new_place, th->th.th_first_place, + th->th.th_last_place, __kmp_affinity_num_masks)); } } else { /* Having uniform space of available computation places I can create @@ -4689,7 +4687,7 @@ place of each partition. */ double current = static_cast(masters_place); double spacing = - (static_cast(n_places + 1) / static_cast(n_th)); + (static_cast(n_places + 1) / static_cast(n_th)); int first, last; kmp_info_t *th; @@ -4735,12 +4733,12 @@ th->th.th_new_place = place; th->th.th_last_place = last; - KA_TRACE(100, ("__kmp_partition_places: spread: T#%d(%d:%d) place %d " - "partition = [%d,%d], spacing = %.4f\n", - __kmp_gtid_from_thread(team->t.t_threads[f]), - team->t.t_id, f, th->th.th_new_place, - th->th.th_first_place, th->th.th_last_place, - spacing)); + KA_TRACE(100, + ("__kmp_partition_places: spread: T#%d(%d:%d) place %d " + "partition = [%d,%d], spacing = %.4f\n", + __kmp_gtid_from_thread(team->t.t_threads[f]), + team->t.t_id, f, th->th.th_new_place, + th->th.th_first_place, th->th.th_last_place, spacing)); } } } @@ -5242,9 +5240,10 @@ return team; } -/* reap team if it is too small, then loop back and check the next one */ -// not sure if this is wise, but, will be redone during the hot-teams rewrite. -/* TODO: Use technique to find the right size hot-team, don't reap them */ + /* reap team if it is too small, then loop back and check the next one */ + // not sure if this is wise, but, will be redone during the hot-teams + // rewrite. + /* TODO: Use technique to find the right size hot-team, don't reap them */ team = __kmp_reap_team(team); __kmp_team_pool = team; } @@ -5902,10 +5901,10 @@ // 2009-09-08 (lev): Other alive roots found. Why do we kill the monitor?? KMP_MB(); /* Flush all pending memory write invalidates. */ -// Need to check that monitor was initialized before reaping it. If we are -// called form __kmp_atfork_child (which sets __kmp_init_parallel = 0), then -// __kmp_monitor will appear to contain valid data, but it is only valid in the -// parent process, not the child. + // Need to check that monitor was initialized before reaping it. If we are + // called form __kmp_atfork_child (which sets __kmp_init_parallel = 0), then + // __kmp_monitor will appear to contain valid data, but it is only valid in + // the parent process, not the child. // New behavior (201008): instead of keying off of the flag // __kmp_init_parallel, the monitor thread creation is keyed off // of the new flag __kmp_init_monitor. Index: openmp/trunk/runtime/src/kmp_safe_c_api.h =================================================================== --- openmp/trunk/runtime/src/kmp_safe_c_api.h +++ openmp/trunk/runtime/src/kmp_safe_c_api.h @@ -8,7 +8,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_SAFE_C_API_H #define KMP_SAFE_C_API_H Index: openmp/trunk/runtime/src/kmp_sched.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_sched.cpp +++ openmp/trunk/runtime/src/kmp_sched.cpp @@ -2,7 +2,6 @@ * kmp_sched.cpp -- static scheduling -- iteration initialization */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - /* Static scheduling initialization. NOTE: team->t.t_nproc is a constant inside of any dispatch loop, however Index: openmp/trunk/runtime/src/kmp_settings.h =================================================================== --- openmp/trunk/runtime/src/kmp_settings.h +++ openmp/trunk/runtime/src/kmp_settings.h @@ -2,7 +2,6 @@ * kmp_settings.h -- Initialize environment variables */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_SETTINGS_H #define KMP_SETTINGS_H Index: openmp/trunk/runtime/src/kmp_settings.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_settings.cpp +++ openmp/trunk/runtime/src/kmp_settings.cpp @@ -2,7 +2,6 @@ * kmp_settings.cpp -- Initialize environment variables */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_affinity.h" #include "kmp_atomic.h" @@ -24,7 +22,7 @@ #include "kmp_settings.h" #include "kmp_str.h" #include "kmp_wrapper_getpid.h" -#include // toupper() +#include // toupper() static int __kmp_env_toPrint(char const *name, int flag); @@ -4928,7 +4926,6 @@ if (value) { ompc_set_dynamic(__kmp_global.g.g_dynamic); } - } void __kmp_env_initialize(char const *string) { @@ -4960,7 +4957,7 @@ } } -// We need to know if blocktime was set when processing OMP_WAIT_POLICY + // We need to know if blocktime was set when processing OMP_WAIT_POLICY blocktime_str = __kmp_env_blk_var(&block, "KMP_BLOCKTIME"); // Special case. If we parse environment, not a string, process KMP_WARNINGS Index: openmp/trunk/runtime/src/kmp_stats.h =================================================================== --- openmp/trunk/runtime/src/kmp_stats.h +++ openmp/trunk/runtime/src/kmp_stats.h @@ -5,7 +5,6 @@ * Functions for collecting statistics. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -15,7 +14,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp_config.h" #if KMP_STATS_ENABLED Index: openmp/trunk/runtime/src/kmp_stats.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_stats.cpp +++ openmp/trunk/runtime/src/kmp_stats.cpp @@ -2,7 +2,6 @@ * Statistics gathering and processing. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_lock.h" #include "kmp_stats.h" Index: openmp/trunk/runtime/src/kmp_stats_timing.h =================================================================== --- openmp/trunk/runtime/src/kmp_stats_timing.h +++ openmp/trunk/runtime/src/kmp_stats_timing.h @@ -5,7 +5,6 @@ * Access to real time clock and timers. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -15,7 +14,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp_os.h" #include #include @@ -59,11 +57,11 @@ tsc_tick_count() : my_count(static_cast(__builtin_readcyclecounter())) {} #elif KMP_HAVE___RDTSC - tsc_tick_count() : my_count(static_cast(__rdtsc())){} + tsc_tick_count() : my_count(static_cast(__rdtsc())) {} #else #error Must have high resolution timer defined #endif - tsc_tick_count(int64_t value) : my_count(value){} + tsc_tick_count(int64_t value) : my_count(value) {} int64_t getValue() const { return my_count; } tsc_tick_count later(tsc_tick_count const other) const { return my_count > other.my_count ? (*this) : other; Index: openmp/trunk/runtime/src/kmp_stats_timing.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_stats_timing.cpp +++ openmp/trunk/runtime/src/kmp_stats_timing.cpp @@ -2,7 +2,6 @@ * Timing functions */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include #include Index: openmp/trunk/runtime/src/kmp_str.h =================================================================== --- openmp/trunk/runtime/src/kmp_str.h +++ openmp/trunk/runtime/src/kmp_str.h @@ -2,7 +2,6 @@ * kmp_str.h -- String manipulation routines. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_STR_H #define KMP_STR_H Index: openmp/trunk/runtime/src/kmp_str.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_str.cpp +++ openmp/trunk/runtime/src/kmp_str.cpp @@ -2,7 +2,6 @@ * kmp_str.cpp -- String manipulation routines. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp_str.h" #include // va_* Index: openmp/trunk/runtime/src/kmp_stub.h =================================================================== --- openmp/trunk/runtime/src/kmp_stub.h +++ openmp/trunk/runtime/src/kmp_stub.h @@ -2,7 +2,6 @@ * kmp_stub.h */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_STUB_H #define KMP_STUB_H Index: openmp/trunk/runtime/src/kmp_stub.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_stub.cpp +++ openmp/trunk/runtime/src/kmp_stub.cpp @@ -2,7 +2,6 @@ * kmp_stub.cpp -- stub versions of user-callable OpenMP RT functions. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include #include #include Index: openmp/trunk/runtime/src/kmp_taskdeps.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_taskdeps.cpp +++ openmp/trunk/runtime/src/kmp_taskdeps.cpp @@ -2,7 +2,6 @@ * kmp_taskdeps.cpp */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - //#define KMP_SUPPORT_GRAPH_OUTPUT 1 #include "kmp.h" Index: openmp/trunk/runtime/src/kmp_tasking.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_tasking.cpp +++ openmp/trunk/runtime/src/kmp_tasking.cpp @@ -2,7 +2,6 @@ * kmp_tasking.cpp -- OpenMP 3.0 tasking support. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_i18n.h" #include "kmp_itt.h" Index: openmp/trunk/runtime/src/kmp_taskq.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_taskq.cpp +++ openmp/trunk/runtime/src/kmp_taskq.cpp @@ -2,7 +2,6 @@ * kmp_taskq.cpp -- TASKQ support for OpenMP. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_error.h" #include "kmp_i18n.h" Index: openmp/trunk/runtime/src/kmp_threadprivate.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_threadprivate.cpp +++ openmp/trunk/runtime/src/kmp_threadprivate.cpp @@ -2,7 +2,6 @@ * kmp_threadprivate.cpp -- OpenMP threadprivate support library */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_i18n.h" #include "kmp_itt.h" Index: openmp/trunk/runtime/src/kmp_utility.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_utility.cpp +++ openmp/trunk/runtime/src/kmp_utility.cpp @@ -2,7 +2,6 @@ * kmp_utility.cpp -- Utility routines for the OpenMP support library. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_i18n.h" #include "kmp_str.h" Index: openmp/trunk/runtime/src/kmp_version.h =================================================================== --- openmp/trunk/runtime/src/kmp_version.h +++ openmp/trunk/runtime/src/kmp_version.h @@ -2,7 +2,6 @@ * kmp_version.h -- version number for this release */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_VERSION_H #define KMP_VERSION_H Index: openmp/trunk/runtime/src/kmp_version.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_version.cpp +++ openmp/trunk/runtime/src/kmp_version.cpp @@ -2,7 +2,6 @@ * kmp_version.cpp */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_io.h" #include "kmp_version.h" Index: openmp/trunk/runtime/src/kmp_wait_release.h =================================================================== --- openmp/trunk/runtime/src/kmp_wait_release.h +++ openmp/trunk/runtime/src/kmp_wait_release.h @@ -2,7 +2,6 @@ * kmp_wait_release.h -- Wait/Release implementation */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_WAIT_RELEASE_H #define KMP_WAIT_RELEASE_H Index: openmp/trunk/runtime/src/kmp_wait_release.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_wait_release.cpp +++ openmp/trunk/runtime/src/kmp_wait_release.cpp @@ -2,7 +2,6 @@ * kmp_wait_release.cpp -- Wait/Release implementation */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure Index: openmp/trunk/runtime/src/kmp_wrapper_getpid.h =================================================================== --- openmp/trunk/runtime/src/kmp_wrapper_getpid.h +++ openmp/trunk/runtime/src/kmp_wrapper_getpid.h @@ -2,7 +2,6 @@ * kmp_wrapper_getpid.h -- getpid() declaration. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_WRAPPER_GETPID_H #define KMP_WRAPPER_GETPID_H Index: openmp/trunk/runtime/src/kmp_wrapper_malloc.h =================================================================== --- openmp/trunk/runtime/src/kmp_wrapper_malloc.h +++ openmp/trunk/runtime/src/kmp_wrapper_malloc.h @@ -3,7 +3,6 @@ * (malloc(), free(), and others). */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -13,7 +12,6 @@ // //===----------------------------------------------------------------------===// - #ifndef KMP_WRAPPER_MALLOC_H #define KMP_WRAPPER_MALLOC_H Index: openmp/trunk/runtime/src/z_Linux_util.cpp =================================================================== --- openmp/trunk/runtime/src/z_Linux_util.cpp +++ openmp/trunk/runtime/src/z_Linux_util.cpp @@ -2,7 +2,6 @@ * z_Linux_util.cpp -- platform specific routines. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_affinity.h" #include "kmp_i18n.h" @@ -1396,7 +1394,6 @@ } } - /* This routine puts the calling thread to sleep after setting the sleep bit for the indicated flag variable to true. */ template Index: openmp/trunk/runtime/src/z_Windows_NT-586_util.cpp =================================================================== --- openmp/trunk/runtime/src/z_Windows_NT-586_util.cpp +++ openmp/trunk/runtime/src/z_Windows_NT-586_util.cpp @@ -2,7 +2,6 @@ * z_Windows_NT-586_util.cpp -- platform specific routines. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #if (KMP_ARCH_X86 || KMP_ARCH_X86_64) Index: openmp/trunk/runtime/src/z_Windows_NT_util.cpp =================================================================== --- openmp/trunk/runtime/src/z_Windows_NT_util.cpp +++ openmp/trunk/runtime/src/z_Windows_NT_util.cpp @@ -2,7 +2,6 @@ * z_Windows_NT_util.cpp -- platform specific routines. */ - //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure @@ -12,7 +11,6 @@ // //===----------------------------------------------------------------------===// - #include "kmp.h" #include "kmp_affinity.h" #include "kmp_i18n.h"