Skip to content

Commit c48b06c

Browse files
author
Simon Moll
committed
[sda][nfc] clang-formatting
1 parent 7a68f0f commit c48b06c

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

llvm/lib/Analysis/SyncDependenceAnalysis.cpp

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//===- SyncDependenceAnalysis.cpp - Divergent Branch Dependence Calculation
2-
//--===//
1+
//==- SyncDependenceAnalysis.cpp - Divergent Branch Dependence Calculation -==//
32
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
54
// See https://llvm.org/LICENSE.txt for license information.
@@ -99,10 +98,10 @@
9998
// loop exit and the loop header (_after_ SSA construction).
10099
//
101100
//===----------------------------------------------------------------------===//
101+
#include "llvm/Analysis/SyncDependenceAnalysis.h"
102102
#include "llvm/ADT/PostOrderIterator.h"
103103
#include "llvm/ADT/SmallPtrSet.h"
104104
#include "llvm/Analysis/PostDominators.h"
105-
#include "llvm/Analysis/SyncDependenceAnalysis.h"
106105
#include "llvm/IR/BasicBlock.h"
107106
#include "llvm/IR/CFG.h"
108107
#include "llvm/IR/Dominators.h"
@@ -221,7 +220,9 @@ struct DivergencePropagator {
221220
SuccessorIterable NodeSuccessors, const Loop *ParentLoop) {
222221
assert(JoinBlocks);
223222

224-
LLVM_DEBUG(dbgs() << "SDA:computeJoinPoints. Parent loop: " << (ParentLoop ? ParentLoop->getName() : "<null>") << "\n" );
223+
LLVM_DEBUG(dbgs() << "SDA:computeJoinPoints. Parent loop: "
224+
<< (ParentLoop ? ParentLoop->getName() : "<null>")
225+
<< "\n");
225226

226227
// bootstrap with branch targets
227228
for (const auto *SuccBlock : NodeSuccessors) {
@@ -236,12 +237,10 @@ struct DivergencePropagator {
236237
}
237238
}
238239

239-
LLVM_DEBUG(
240-
dbgs() << "SDA: rpo order:\n";
241-
for (const auto * RpoBlock : FuncRPOT) {
242-
dbgs() << "- " << RpoBlock->getName() << "\n";
243-
}
244-
);
240+
LLVM_DEBUG(dbgs() << "SDA: rpo order:\n"; for (const auto *RpoBlock
241+
: FuncRPOT) {
242+
dbgs() << "- " << RpoBlock->getName() << "\n";
243+
});
245244

246245
auto ItBeginRPO = FuncRPOT.begin();
247246
auto ItEndRPO = FuncRPOT.end();
@@ -253,8 +252,7 @@ struct DivergencePropagator {
253252

254253
// propagate definitions at the immediate successors of the node in RPO
255254
auto ItBlockRPO = ItBeginRPO;
256-
while ((++ItBlockRPO != ItEndRPO) &&
257-
!PendingUpdates.empty()) {
255+
while ((++ItBlockRPO != ItEndRPO) && !PendingUpdates.empty()) {
258256
const auto *Block = *ItBlockRPO;
259257
LLVM_DEBUG(dbgs() << "SDA::joins. visiting " << Block->getName() << "\n");
260258

@@ -311,7 +309,8 @@ struct DivergencePropagator {
311309

312310
assert(ParentLoop);
313311
auto ItHeaderDef = DefMap.find(ParentLoopHeader);
314-
const auto *HeaderDefBlock = (ItHeaderDef == DefMap.end()) ? nullptr : ItHeaderDef->second;
312+
const auto *HeaderDefBlock =
313+
(ItHeaderDef == DefMap.end()) ? nullptr : ItHeaderDef->second;
315314

316315
LLVM_DEBUG(printDefs(dbgs()));
317316
assert(HeaderDefBlock && "no definition at header of carrying loop");

0 commit comments

Comments
 (0)