Skip to content

Commit d4a8240

Browse files
committed
Random formatting
1 parent 2117b79 commit d4a8240

File tree

12 files changed

+72
-116
lines changed

12 files changed

+72
-116
lines changed

llvm/lib/FileCheck/CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
add_llvm_component_library(LLVMFileCheck
2-
FileCheck.cpp
1+
add_llvm_component_library(LLVMFileCheck FileCheck.cpp
32

4-
ADDITIONAL_HEADER_DIRS
5-
"${LLVM_MAIN_INCLUDE_DIR}/llvm/FileCheck"
6-
)
3+
ADDITIONAL_HEADER_DIRS
4+
"${LLVM_MAIN_INCLUDE_DIR}/llvm/FileCheck")
75

8-
target_link_libraries(LLVMFileCheck LLVMSupport)
6+
target_link_libraries(LLVMFileCheck LLVMSupport)

llvm/lib/FileCheck/FileCheck.cpp

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
// FileCheck does a line-by line check of a file that validates whether it
1010
// contains the expected content. This is useful for regression tests etc.
1111
//
12-
// This file implements most of the API that will be used by the FileCheck utility
13-
// as well as various unittests.
12+
// This file implements most of the API that will be used by the FileCheck
13+
// utility as well as various unittests.
1414
//===----------------------------------------------------------------------===//
1515

1616
#include "llvm/FileCheck/FileCheck.h"
@@ -307,7 +307,7 @@ Pattern::parseVariable(StringRef &Str, const SourceMgr &SM) {
307307

308308
StringRef Name = Str.take_front(I);
309309
Str = Str.substr(I);
310-
return VariableProperties {Name, IsPseudo};
310+
return VariableProperties{Name, IsPseudo};
311311
}
312312

313313
// StringRef holding all characters considered as horizontal whitespaces by
@@ -1847,20 +1847,22 @@ bool FileCheck::readCheckFile(
18471847

18481848
// Verify that CHECK-LABEL lines do not define or use variables
18491849
if ((CheckTy == Check::CheckLabel) && P.hasVariable()) {
1850-
SM.PrintMessage(
1851-
SMLoc::getFromPointer(UsedPrefixStart), SourceMgr::DK_Error,
1852-
"found '" + UsedPrefix + "-LABEL:'"
1853-
" with variable definition or use");
1850+
SM.PrintMessage(SMLoc::getFromPointer(UsedPrefixStart),
1851+
SourceMgr::DK_Error,
1852+
"found '" + UsedPrefix +
1853+
"-LABEL:'"
1854+
" with variable definition or use");
18541855
return true;
18551856
}
18561857

1857-
// Verify that CHECK-NEXT/SAME/EMPTY lines have at least one CHECK line before them.
1858+
// Verify that CHECK-NEXT/SAME/EMPTY lines have at least one CHECK line
1859+
// before them.
18581860
if ((CheckTy == Check::CheckNext || CheckTy == Check::CheckSame ||
18591861
CheckTy == Check::CheckEmpty) &&
18601862
CheckStrings->empty()) {
1861-
StringRef Type = CheckTy == Check::CheckNext
1862-
? "NEXT"
1863-
: CheckTy == Check::CheckEmpty ? "EMPTY" : "SAME";
1863+
StringRef Type = CheckTy == Check::CheckNext ? "NEXT"
1864+
: CheckTy == Check::CheckEmpty ? "EMPTY"
1865+
: "SAME";
18641866
SM.PrintMessage(SMLoc::getFromPointer(UsedPrefixStart),
18651867
SourceMgr::DK_Error,
18661868
"found '" + UsedPrefix + "-" + Type +

llvm/lib/Frontend/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
add_subdirectory(HLSL)
2-
add_subdirectory(OpenACC)
3-
add_subdirectory(OpenMP)
1+
add_subdirectory(HLSL) add_subdirectory(OpenACC) add_subdirectory(OpenMP)

llvm/lib/Frontend/HLSL/CMakeLists.txt

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
add_llvm_component_library(LLVMFrontendHLSL
2-
HLSLResource.cpp
1+
add_llvm_component_library(LLVMFrontendHLSL HLSLResource.cpp
32

4-
ADDITIONAL_HEADER_DIRS
5-
${LLVM_MAIN_INCLUDE_DIR}/llvm/Frontend
6-
${LLVM_MAIN_INCLUDE_DIR}/llvm/Frontend/HLSL
3+
ADDITIONAL_HEADER_DIRS ${LLVM_MAIN_INCLUDE_DIR} /
4+
llvm / Frontend ${LLVM_MAIN_INCLUDE_DIR} / llvm /
5+
Frontend /
6+
HLSL
77

8-
DEPENDS
9-
intrinsics_gen
8+
DEPENDS intrinsics_gen
109

11-
LINK_COMPONENTS
12-
Core
13-
Support
14-
)
10+
LINK_COMPONENTS Core Support)
Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
add_llvm_component_library(LLVMFrontendOpenACC
2-
ACC.cpp
1+
add_llvm_component_library(LLVMFrontendOpenACC ACC.cpp
32

4-
ADDITIONAL_HEADER_DIRS
5-
${LLVM_MAIN_INCLUDE_DIR}/llvm/Frontend
6-
${LLVM_MAIN_INCLUDE_DIR}/llvm/Frontend/OpenACC
3+
ADDITIONAL_HEADER_DIRS ${LLVM_MAIN_INCLUDE_DIR} /
4+
llvm / Frontend ${LLVM_MAIN_INCLUDE_DIR} / llvm /
5+
Frontend /
6+
OpenACC
77

8-
DEPENDS
9-
acc_gen
10-
)
11-
12-
target_link_libraries(LLVMFrontendOpenACC LLVMSupport)
8+
DEPENDS acc_gen)
139

10+
target_link_libraries(LLVMFrontendOpenACC LLVMSupport)
Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
1-
add_llvm_component_library(LLVMFrontendOpenMP
2-
OMP.cpp
3-
OMPContext.cpp
4-
OMPIRBuilder.cpp
1+
add_llvm_component_library(
2+
LLVMFrontendOpenMP OMP.cpp OMPContext.cpp OMPIRBuilder.cpp
53

6-
ADDITIONAL_HEADER_DIRS
7-
${LLVM_MAIN_INCLUDE_DIR}/llvm/Frontend
8-
${LLVM_MAIN_INCLUDE_DIR}/llvm/Frontend/OpenMP
4+
ADDITIONAL_HEADER_DIRS ${LLVM_MAIN_INCLUDE_DIR} /
5+
llvm / Frontend ${LLVM_MAIN_INCLUDE_DIR} / llvm / Frontend /
6+
OpenMP
97

10-
DEPENDS
11-
intrinsics_gen
12-
omp_gen
8+
DEPENDS intrinsics_gen omp_gen
139

14-
LINK_COMPONENTS
15-
Core
16-
Support
17-
TargetParser
18-
TransformUtils
19-
Analysis
20-
MC
21-
Scalar
22-
BitReader
23-
)
10+
LINK_COMPONENTS Core Support TargetParser TransformUtils Analysis MC
11+
Scalar BitReader)

llvm/lib/FuzzMutate/CMakeLists.txt

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,23 @@
1-
# Generic helper for fuzzer binaries.
2-
# This should not depend on LLVM IR etc.
3-
add_llvm_component_library(LLVMFuzzerCLI
4-
FuzzerCLI.cpp
5-
PARTIAL_SOURCES_INTENDED
1+
#Generic helper for fuzzer binaries.
2+
#This should not depend on LLVM IR etc.
3+
add_llvm_component_library(LLVMFuzzerCLI FuzzerCLI.cpp PARTIAL_SOURCES_INTENDED
64

7-
ADDITIONAL_HEADER_DIRS
8-
${LLVM_MAIN_INCLUDE_DIR}/llvm/FuzzMutate
5+
ADDITIONAL_HEADER_DIRS ${LLVM_MAIN_INCLUDE_DIR} /
6+
llvm /
7+
FuzzMutate
98

10-
LINK_COMPONENTS
11-
Support
12-
TargetParser
13-
)
9+
LINK_COMPONENTS Support TargetParser)
1410

15-
# Library for using LLVM IR together with fuzzers.
16-
add_llvm_component_library(LLVMFuzzMutate
17-
IRMutator.cpp
18-
OpDescriptor.cpp
19-
Operations.cpp
20-
RandomIRBuilder.cpp
11+
#Library for using LLVM IR together with fuzzers.
12+
add_llvm_component_library(
13+
LLVMFuzzMutate IRMutator.cpp OpDescriptor.cpp Operations
14+
.cpp RandomIRBuilder.cpp
2115

22-
ADDITIONAL_HEADER_DIRS
23-
${LLVM_MAIN_INCLUDE_DIR}/llvm/FuzzMutate
16+
ADDITIONAL_HEADER_DIRS ${LLVM_MAIN_INCLUDE_DIR} /
17+
llvm /
18+
FuzzMutate
2419

25-
DEPENDS
26-
intrinsics_gen
20+
DEPENDS intrinsics_gen
2721

28-
LINK_COMPONENTS
29-
Analysis
30-
BitReader
31-
BitWriter
32-
Core
33-
Scalar
34-
Support
35-
TargetParser
36-
TransformUtils
37-
)
22+
LINK_COMPONENTS Analysis BitReader BitWriter Core Scalar Support
23+
TargetParser TransformUtils)

llvm/lib/Fuzzer/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
libFuzzer was moved to compiler-rt in https://reviews.llvm.org/D36908.
1+
libFuzzer was moved to compiler - rt in https: // reviews.llvm.org/D36908.

llvm/lib/InterfaceStub/CMakeLists.txt

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
add_llvm_component_library(LLVMInterfaceStub
2-
ELFObjHandler.cpp
3-
IFSHandler.cpp
4-
IFSStub.cpp
1+
add_llvm_component_library(
2+
LLVMInterfaceStub ELFObjHandler.cpp IFSHandler.cpp IFSStub.cpp
53

6-
LINK_COMPONENTS
7-
BinaryFormat
8-
MC
9-
Object
10-
Support
11-
TargetParser
12-
)
4+
LINK_COMPONENTS BinaryFormat MC Object Support TargetParser)

llvm/lib/MCA/HardwareUnits/LSUnit.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ unsigned LSUnit::dispatch(const InstRef &IR) {
9696
if (CurrentStoreBarrierGroupID) {
9797
MemoryGroup &StoreGroup = getGroup(CurrentStoreBarrierGroupID);
9898
LLVM_DEBUG(dbgs() << "[LSUnit]: GROUP DEP: ("
99-
<< CurrentStoreBarrierGroupID
100-
<< ") --> (" << NewGID << ")\n");
99+
<< CurrentStoreBarrierGroupID << ") --> (" << NewGID
100+
<< ")\n");
101101
StoreGroup.addSuccessor(&NewGroup, true);
102102
}
103103

@@ -110,7 +110,6 @@ unsigned LSUnit::dispatch(const InstRef &IR) {
110110
StoreGroup.addSuccessor(&NewGroup, !assumeNoAlias());
111111
}
112112

113-
114113
CurrentStoreGroupID = NewGID;
115114
if (IsStoreBarrier)
116115
CurrentStoreBarrierGroupID = NewGID;
@@ -165,8 +164,7 @@ unsigned LSUnit::dispatch(const InstRef &IR) {
165164
if (IsLoadBarrier) {
166165
if (ImmediateLoadDominator) {
167166
MemoryGroup &LoadGroup = getGroup(ImmediateLoadDominator);
168-
LLVM_DEBUG(dbgs() << "[LSUnit]: GROUP DEP: ("
169-
<< ImmediateLoadDominator
167+
LLVM_DEBUG(dbgs() << "[LSUnit]: GROUP DEP: (" << ImmediateLoadDominator
170168
<< ") --> (" << NewGID << ")\n");
171169
LoadGroup.addSuccessor(&NewGroup, true);
172170
}
@@ -175,8 +173,8 @@ unsigned LSUnit::dispatch(const InstRef &IR) {
175173
if (CurrentLoadBarrierGroupID) {
176174
MemoryGroup &LoadGroup = getGroup(CurrentLoadBarrierGroupID);
177175
LLVM_DEBUG(dbgs() << "[LSUnit]: GROUP DEP: ("
178-
<< CurrentLoadBarrierGroupID
179-
<< ") --> (" << NewGID << ")\n");
176+
<< CurrentLoadBarrierGroupID << ") --> (" << NewGID
177+
<< ")\n");
180178
LoadGroup.addSuccessor(&NewGroup, true);
181179
}
182180
}

llvm/lib/MCA/HardwareUnits/RetireControlUnit.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ const RetireControlUnit::RUToken &RetireControlUnit::getCurrentToken() const {
6666

6767
unsigned RetireControlUnit::computeNextSlotIdx() const {
6868
const RetireControlUnit::RUToken &Current = getCurrentToken();
69-
unsigned NextSlotIdx = CurrentInstructionSlotIdx + std::max(1U, Current.NumSlots);
69+
unsigned NextSlotIdx =
70+
CurrentInstructionSlotIdx + std::max(1U, Current.NumSlots);
7071
return NextSlotIdx % Queue.size();
7172
}
7273

@@ -82,12 +83,13 @@ void RetireControlUnit::consumeCurrentToken() {
8283
CurrentInstructionSlotIdx += std::max(1U, Current.NumSlots);
8384
CurrentInstructionSlotIdx %= Queue.size();
8485
AvailableEntries += Current.NumSlots;
85-
Current = { InstRef(), 0U, false };
86+
Current = {InstRef(), 0U, false};
8687
}
8788

8889
void RetireControlUnit::onInstructionExecuted(unsigned TokenID) {
8990
assert(Queue.size() > TokenID);
90-
assert(Queue[TokenID].IR.getInstruction() && "Instruction was not dispatched!");
91+
assert(Queue[TokenID].IR.getInstruction() &&
92+
"Instruction was not dispatched!");
9193
assert(Queue[TokenID].Executed == false && "Instruction already executed!");
9294
Queue[TokenID].Executed = true;
9395
}

llvm/lib/MCA/Stages/InstructionTables.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Error InstructionTables::execute(InstRef &IR) {
2424
UsedResources.clear();
2525

2626
// Identify the resources consumed by this instruction.
27-
for (const std::pair<uint64_t, ResourceUsage> &Resource :
28-
Desc.Resources) {
27+
for (const std::pair<uint64_t, ResourceUsage> &Resource : Desc.Resources) {
2928
// Skip zero-cycle resources (i.e., unused resources).
3029
if (!Resource.second.size())
3130
continue;

0 commit comments

Comments
 (0)