Skip to content

Commit

Permalink
Apply formatting changes
Browse files Browse the repository at this point in the history
.clang-format's comments are removed and a (hopefully) final
set of formatting changes are applied.

Differential Revision: https://reviews.llvm.org/D38837
Differential Revision: https://reviews.llvm.org/D38920

llvm-svn: 316227
  • Loading branch information
jpeyton52 committed Oct 20, 2017
1 parent 1311ff1 commit 94a114f
Show file tree
Hide file tree
Showing 67 changed files with 42 additions and 268 deletions.
86 changes: 0 additions & 86 deletions openmp/runtime/.clang-format
Expand Up @@ -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
...
2 changes: 0 additions & 2 deletions openmp/runtime/src/extractExternal.cpp
Expand Up @@ -2,7 +2,6 @@
* extractExternal.cpp
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -12,7 +11,6 @@
//
//===----------------------------------------------------------------------===//


#include <fstream>
#include <iostream>
#include <map>
Expand Down
2 changes: 0 additions & 2 deletions openmp/runtime/src/kmp.h
Expand Up @@ -3,7 +3,6 @@
* kmp.h -- KPTS runtime header file.
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -13,7 +12,6 @@
//
//===----------------------------------------------------------------------===//


#ifndef KMP_H
#define KMP_H

Expand Down
3 changes: 0 additions & 3 deletions openmp/runtime/src/kmp_affinity.cpp
Expand Up @@ -2,7 +2,6 @@
* kmp_affinity.cpp -- affinity management
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -12,7 +11,6 @@
//
//===----------------------------------------------------------------------===//


#include "kmp.h"
#include "kmp_affinity.h"
#include "kmp_i18n.h"
Expand All @@ -25,7 +23,6 @@ static hierarchy_info machine_hierarchy;

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
Expand Down
2 changes: 0 additions & 2 deletions openmp/runtime/src/kmp_affinity.h
Expand Up @@ -2,7 +2,6 @@
* kmp_affinity.h -- header for affinity management
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -12,7 +11,6 @@
//
//===----------------------------------------------------------------------===//


#ifndef KMP_AFFINITY_H
#define KMP_AFFINITY_H

Expand Down
2 changes: 0 additions & 2 deletions openmp/runtime/src/kmp_alloc.cpp
Expand Up @@ -2,7 +2,6 @@
* kmp_alloc.cpp -- private/shared dynamic memory allocation and management
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -12,7 +11,6 @@
//
//===----------------------------------------------------------------------===//


#include "kmp.h"
#include "kmp_io.h"
#include "kmp_wrapper_malloc.h"
Expand Down
2 changes: 0 additions & 2 deletions openmp/runtime/src/kmp_atomic.cpp
Expand Up @@ -2,7 +2,6 @@
* kmp_atomic.cpp -- ATOMIC implementation routines
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -12,7 +11,6 @@
//
//===----------------------------------------------------------------------===//


#include "kmp_atomic.h"
#include "kmp.h" // TRUE, asm routines prototypes

Expand Down
2 changes: 0 additions & 2 deletions openmp/runtime/src/kmp_atomic.h
Expand Up @@ -2,7 +2,6 @@
* kmp_atomic.h - ATOMIC header file
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -12,7 +11,6 @@
//
//===----------------------------------------------------------------------===//


#ifndef KMP_ATOMIC_H
#define KMP_ATOMIC_H

Expand Down
6 changes: 1 addition & 5 deletions openmp/runtime/src/kmp_barrier.cpp
Expand Up @@ -2,7 +2,6 @@
* kmp_barrier.cpp
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -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 <immintrin.h>
#define USE_NGO_STORES 1
Expand Down Expand Up @@ -87,8 +84,7 @@ static void __kmp_linear_barrier_gather(
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) {
Expand Down
1 change: 0 additions & 1 deletion openmp/runtime/src/kmp_cancel.cpp
Expand Up @@ -8,7 +8,6 @@
//
//===----------------------------------------------------------------------===//


#include "kmp.h"
#include "kmp_i18n.h"
#include "kmp_io.h"
Expand Down
2 changes: 0 additions & 2 deletions openmp/runtime/src/kmp_csupport.cpp
Expand Up @@ -2,7 +2,6 @@
* kmp_csupport.cpp -- kfront linkage support for OpenMP.
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -12,7 +11,6 @@
//
//===----------------------------------------------------------------------===//


#include "omp.h" /* extern "C" declarations of user-visible routines */
#include "kmp.h"
#include "kmp_error.h"
Expand Down
2 changes: 0 additions & 2 deletions openmp/runtime/src/kmp_debug.cpp
Expand Up @@ -2,7 +2,6 @@
* kmp_debug.cpp -- debug utilities for the Guide library
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -12,7 +11,6 @@
//
//===----------------------------------------------------------------------===//


#include "kmp.h"
#include "kmp_debug.h" /* really necessary? */
#include "kmp_i18n.h"
Expand Down
2 changes: 0 additions & 2 deletions openmp/runtime/src/kmp_debug.h
Expand Up @@ -2,7 +2,6 @@
* kmp_debug.h -- debug / assertion code for Assure library
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -12,7 +11,6 @@
//
//===----------------------------------------------------------------------===//


#ifndef KMP_DEBUG_H
#define KMP_DEBUG_H

Expand Down
2 changes: 0 additions & 2 deletions openmp/runtime/src/kmp_debugger.cpp
Expand Up @@ -3,7 +3,6 @@
* kmp_debugger.cpp -- debugger support.
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -13,7 +12,6 @@
//
//===----------------------------------------------------------------------===//


#include "kmp.h"
#include "kmp_lock.h"
#include "kmp_omp.h"
Expand Down
2 changes: 0 additions & 2 deletions openmp/runtime/src/kmp_debugger.h
Expand Up @@ -3,7 +3,6 @@
* kmp_debugger.h -- debugger support.
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -13,7 +12,6 @@
//
//===----------------------------------------------------------------------===//


#ifndef KMP_DEBUGGER_H
#define KMP_DEBUGGER_H

Expand Down
10 changes: 4 additions & 6 deletions openmp/runtime/src/kmp_dispatch.cpp
Expand Up @@ -2,7 +2,6 @@
* kmp_dispatch.cpp: dynamic scheduling - iteration initialization and dispatch.
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -12,7 +11,6 @@
//
//===----------------------------------------------------------------------===//


/* Dynamic scheduling initialization and dispatch.
*
* NOTE: __kmp_nth is a constant inside of any dispatch loop, however
Expand Down Expand Up @@ -1978,8 +1976,8 @@ static int __kmp_dispatch_next(ident_t *loc, int gtid, kmp_int32 *p_last,
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<ST>(
RCAST(volatile ST *, &sh->u.s.iteration), (ST)chunkspec);
init = test_then_add<ST>(RCAST(volatile ST *, &sh->u.s.iteration),
(ST)chunkspec);
remaining = trip - init;
if (remaining <= 0) {
status = 0; // all iterations got by other threads
Expand Down Expand Up @@ -2057,8 +2055,8 @@ static int __kmp_dispatch_next(ident_t *loc, int gtid, kmp_int32 *p_last,
if ((T)remaining < pr->u.p.parm2) {
// use dynamic-style shcedule
// atomically inrement iterations, get old value
init = test_then_add<ST>(
RCAST(volatile ST *, &sh->u.s.iteration), (ST)chunk);
init = test_then_add<ST>(RCAST(volatile ST *, &sh->u.s.iteration),
(ST)chunk);
remaining = trip - init;
if (remaining <= 0) {
status = 0; // all iterations got by other threads
Expand Down
2 changes: 0 additions & 2 deletions openmp/runtime/src/kmp_environment.cpp
Expand Up @@ -2,7 +2,6 @@
* kmp_environment.cpp -- Handle environment variables OS-independently.
*/


//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
Expand All @@ -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
Expand Down

0 comments on commit 94a114f

Please sign in to comment.