Skip to content

Commit 16724fd

Browse files
committed
[llvm] clang-format changes to Transforms library
1 parent d72edfc commit 16724fd

File tree

100 files changed

+1314
-1095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1314
-1095
lines changed

llvm/include/llvm/Transforms/Coroutines/ABI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#ifndef LLVM_TRANSFORMS_COROUTINES_ABI_H
1616
#define LLVM_TRANSFORMS_COROUTINES_ABI_H
1717

18-
#include "llvm/Support/Compiler.h"
1918
#include "llvm/Analysis/TargetTransformInfo.h"
19+
#include "llvm/Support/Compiler.h"
2020
#include "llvm/Transforms/Coroutines/CoroShape.h"
2121
#include "llvm/Transforms/Coroutines/MaterializationUtils.h"
2222
#include "llvm/Transforms/Coroutines/SuspendCrossingInfo.h"

llvm/include/llvm/Transforms/Coroutines/CoroInstr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
#ifndef LLVM_TRANSFORMS_COROUTINES_COROINSTR_H
2626
#define LLVM_TRANSFORMS_COROUTINES_COROINSTR_H
2727

28-
#include "llvm/Support/Compiler.h"
2928
#include "llvm/IR/GlobalVariable.h"
3029
#include "llvm/IR/IntrinsicInst.h"
30+
#include "llvm/Support/Compiler.h"
3131
#include "llvm/Support/raw_ostream.h"
3232

3333
namespace llvm {

llvm/include/llvm/Transforms/Coroutines/CoroShape.h

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
#ifndef LLVM_TRANSFORMS_COROUTINES_COROSHAPE_H
1313
#define LLVM_TRANSFORMS_COROUTINES_COROSHAPE_H
1414

15-
#include "llvm/Support/Compiler.h"
1615
#include "llvm/IR/IRBuilder.h"
1716
#include "llvm/IR/PassManager.h"
17+
#include "llvm/Support/Compiler.h"
1818
#include "llvm/Transforms/Coroutines/CoroInstr.h"
1919

2020
namespace llvm {
@@ -79,18 +79,20 @@ struct Shape {
7979
}
8080

8181
// Scan the function and collect the above intrinsics for later processing
82-
LLVM_ABI void analyze(Function &F, SmallVectorImpl<CoroFrameInst *> &CoroFrames,
83-
SmallVectorImpl<CoroSaveInst *> &UnusedCoroSaves,
84-
CoroPromiseInst *&CoroPromise);
82+
LLVM_ABI void analyze(Function &F,
83+
SmallVectorImpl<CoroFrameInst *> &CoroFrames,
84+
SmallVectorImpl<CoroSaveInst *> &UnusedCoroSaves,
85+
CoroPromiseInst *&CoroPromise);
8586
// If for some reason, we were not able to find coro.begin, bailout.
86-
LLVM_ABI void invalidateCoroutine(Function &F,
87-
SmallVectorImpl<CoroFrameInst *> &CoroFrames);
87+
LLVM_ABI void
88+
invalidateCoroutine(Function &F,
89+
SmallVectorImpl<CoroFrameInst *> &CoroFrames);
8890
// Perform ABI related initial transformation
8991
LLVM_ABI void initABI();
9092
// Remove orphaned and unnecessary intrinsics
9193
LLVM_ABI void cleanCoroutine(SmallVectorImpl<CoroFrameInst *> &CoroFrames,
92-
SmallVectorImpl<CoroSaveInst *> &UnusedCoroSaves,
93-
CoroPromiseInst *CoroPromise);
94+
SmallVectorImpl<CoroSaveInst *> &UnusedCoroSaves,
95+
CoroPromiseInst *CoroPromise);
9496

9597
// Field indexes for special fields in the switch lowering.
9698
struct SwitchFieldIndex {
@@ -257,12 +259,14 @@ struct Shape {
257259
/// Allocate memory according to the rules of the active lowering.
258260
///
259261
/// \param CG - if non-null, will be updated for the new call
260-
LLVM_ABI Value *emitAlloc(IRBuilder<> &Builder, Value *Size, CallGraph *CG) const;
262+
LLVM_ABI Value *emitAlloc(IRBuilder<> &Builder, Value *Size,
263+
CallGraph *CG) const;
261264

262265
/// Deallocate memory according to the rules of the active lowering.
263266
///
264267
/// \param CG - if non-null, will be updated for the new call
265-
LLVM_ABI void emitDealloc(IRBuilder<> &Builder, Value *Ptr, CallGraph *CG) const;
268+
LLVM_ABI void emitDealloc(IRBuilder<> &Builder, Value *Ptr,
269+
CallGraph *CG) const;
266270

267271
Shape() = default;
268272
explicit Shape(Function &F) {

llvm/include/llvm/Transforms/Coroutines/CoroSplit.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
#ifndef LLVM_TRANSFORMS_COROUTINES_COROSPLIT_H
1616
#define LLVM_TRANSFORMS_COROUTINES_COROSPLIT_H
1717

18-
#include "llvm/Support/Compiler.h"
1918
#include "llvm/Analysis/CGSCCPassManager.h"
2019
#include "llvm/Analysis/LazyCallGraph.h"
2120
#include "llvm/IR/PassManager.h"
21+
#include "llvm/Support/Compiler.h"
2222
#include "llvm/Transforms/Coroutines/ABI.h"
2323

2424
namespace llvm {
@@ -35,17 +35,20 @@ struct CoroSplitPass : PassInfoMixin<CoroSplitPass> {
3535
LLVM_ABI CoroSplitPass(bool OptimizeFrame = false);
3636

3737
LLVM_ABI CoroSplitPass(SmallVector<BaseABITy> GenCustomABIs,
38-
bool OptimizeFrame = false);
38+
bool OptimizeFrame = false);
3939

40-
LLVM_ABI CoroSplitPass(std::function<bool(Instruction &)> MaterializableCallback,
40+
LLVM_ABI
41+
CoroSplitPass(std::function<bool(Instruction &)> MaterializableCallback,
4142
bool OptimizeFrame = false);
4243

43-
LLVM_ABI CoroSplitPass(std::function<bool(Instruction &)> MaterializableCallback,
44+
LLVM_ABI
45+
CoroSplitPass(std::function<bool(Instruction &)> MaterializableCallback,
4446
SmallVector<BaseABITy> GenCustomABIs,
4547
bool OptimizeFrame = false);
4648

47-
LLVM_ABI PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM,
48-
LazyCallGraph &CG, CGSCCUpdateResult &UR);
49+
LLVM_ABI PreservedAnalyses run(LazyCallGraph::SCC &C,
50+
CGSCCAnalysisManager &AM, LazyCallGraph &CG,
51+
CGSCCUpdateResult &UR);
4952

5053
static bool isRequired() { return true; }
5154

llvm/include/llvm/Transforms/Coroutines/MaterializationUtils.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ namespace coro {
2020
LLVM_ABI bool isTriviallyMaterializable(Instruction &I);
2121

2222
// Performs rematerialization, invoked from buildCoroutineFrame.
23-
LLVM_ABI void doRematerializations(Function &F, SuspendCrossingInfo &Checker,
24-
std::function<bool(Instruction &)> IsMaterializable);
23+
LLVM_ABI void
24+
doRematerializations(Function &F, SuspendCrossingInfo &Checker,
25+
std::function<bool(Instruction &)> IsMaterializable);
2526

2627
} // namespace coro
2728

llvm/include/llvm/Transforms/Coroutines/SuspendCrossingInfo.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
#ifndef LLVM_TRANSFORMS_COROUTINES_SUSPENDCROSSINGINFO_H
1616
#define LLVM_TRANSFORMS_COROUTINES_SUSPENDCROSSINGINFO_H
1717

18-
#include "llvm/Support/Compiler.h"
1918
#include "llvm/ADT/BitVector.h"
2019
#include "llvm/ADT/PostOrderIterator.h"
2120
#include "llvm/ADT/SmallVector.h"
2221
#include "llvm/IR/BasicBlock.h"
2322
#include "llvm/IR/Function.h"
2423
#include "llvm/IR/Instruction.h"
24+
#include "llvm/Support/Compiler.h"
2525
#include "llvm/Transforms/Coroutines/CoroInstr.h"
2626

2727
namespace llvm {
@@ -103,19 +103,21 @@ class SuspendCrossingInfo {
103103
ModuleSlotTracker &MST) const;
104104
#endif
105105

106-
LLVM_ABI SuspendCrossingInfo(Function &F,
106+
LLVM_ABI
107+
SuspendCrossingInfo(Function &F,
107108
const SmallVectorImpl<AnyCoroSuspendInst *> &CoroSuspends,
108109
const SmallVectorImpl<AnyCoroEndInst *> &CoroEnds);
109110

110111
/// Returns true if there is a path from \p From to \p To crossing a suspend
111112
/// point without crossing \p From a 2nd time.
112-
LLVM_ABI bool hasPathCrossingSuspendPoint(BasicBlock *From, BasicBlock *To) const;
113+
LLVM_ABI bool hasPathCrossingSuspendPoint(BasicBlock *From,
114+
BasicBlock *To) const;
113115

114116
/// Returns true if there is a path from \p From to \p To crossing a suspend
115117
/// point without crossing \p From a 2nd time. If \p From is the same as \p To
116118
/// this will also check if there is a looping path crossing a suspend point.
117119
LLVM_ABI bool hasPathOrLoopCrossingSuspendPoint(BasicBlock *From,
118-
BasicBlock *To) const;
120+
BasicBlock *To) const;
119121

120122
bool isDefinitionAcrossSuspend(BasicBlock *DefBB, User *U) const {
121123
auto *I = cast<Instruction>(U);

llvm/include/llvm/Transforms/HipStdPar/HipStdPar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#ifndef LLVM_TRANSFORMS_HIPSTDPAR_HIPSTDPAR_H
1919
#define LLVM_TRANSFORMS_HIPSTDPAR_HIPSTDPAR_H
2020

21-
#include "llvm/Support/Compiler.h"
2221
#include "llvm/IR/PassManager.h"
22+
#include "llvm/Support/Compiler.h"
2323

2424
namespace llvm {
2525

llvm/include/llvm/Transforms/IPO/AlwaysInliner.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#ifndef LLVM_TRANSFORMS_IPO_ALWAYSINLINER_H
1515
#define LLVM_TRANSFORMS_IPO_ALWAYSINLINER_H
1616

17-
#include "llvm/Support/Compiler.h"
1817
#include "llvm/IR/PassManager.h"
18+
#include "llvm/Support/Compiler.h"
1919

2020
namespace llvm {
2121

@@ -44,7 +44,6 @@ class AlwaysInlinerPass : public PassInfoMixin<AlwaysInlinerPass> {
4444
/// Create a legacy pass manager instance of a pass to inline and remove
4545
/// functions marked as "always_inline".
4646
LLVM_ABI Pass *createAlwaysInlinerLegacyPass(bool InsertLifetime = true);
47-
4847
}
4948

5049
#endif // LLVM_TRANSFORMS_IPO_ALWAYSINLINER_H

0 commit comments

Comments
 (0)