Skip to content

Commit 23923f3

Browse files
committed
[llvm] clang-format changes
1 parent f7420b0 commit 23923f3

File tree

12 files changed

+88
-70
lines changed

12 files changed

+88
-70
lines changed

llvm/include/llvm/CodeGenTypes/LowLevelType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
#ifndef LLVM_CODEGEN_LOWLEVELTYPE_H
2727
#define LLVM_CODEGEN_LOWLEVELTYPE_H
2828

29-
#include "llvm/Support/Compiler.h"
3029
#include "llvm/ADT/DenseMapInfo.h"
3130
#include "llvm/CodeGenTypes/MachineValueType.h"
31+
#include "llvm/Support/Compiler.h"
3232
#include "llvm/Support/Debug.h"
3333
#include <cassert>
3434

llvm/include/llvm/CodeGenTypes/MachineValueType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#ifndef LLVM_CODEGEN_MACHINEVALUETYPE_H
1717
#define LLVM_CODEGEN_MACHINEVALUETYPE_H
1818

19-
#include "llvm/Support/Compiler.h"
2019
#include "llvm/ADT/Sequence.h"
20+
#include "llvm/Support/Compiler.h"
2121
#include "llvm/Support/ErrorHandling.h"
2222
#include "llvm/Support/MathExtras.h"
2323
#include "llvm/Support/TypeSize.h"

llvm/lib/CodeGen/AsmPrinter/DIEHash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
#ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DIEHASH_H
1414
#define LLVM_LIB_CODEGEN_ASMPRINTER_DIEHASH_H
1515

16-
#include "llvm/Support/Compiler.h"
1716
#include "llvm/ADT/DenseMap.h"
1817
#include "llvm/CodeGen/DIE.h"
18+
#include "llvm/Support/Compiler.h"
1919
#include "llvm/Support/MD5.h"
2020

2121
namespace llvm {

llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@ class DwarfStringPool {
3838
public:
3939
using EntryRef = DwarfStringPoolEntryRef;
4040

41-
LLVM_ABI DwarfStringPool(BumpPtrAllocator &A, AsmPrinter &Asm, StringRef Prefix);
41+
LLVM_ABI DwarfStringPool(BumpPtrAllocator &A, AsmPrinter &Asm,
42+
StringRef Prefix);
4243

43-
LLVM_ABI void emitStringOffsetsTableHeader(AsmPrinter &Asm, MCSection *OffsetSection,
44-
MCSymbol *StartSym);
44+
LLVM_ABI void emitStringOffsetsTableHeader(AsmPrinter &Asm,
45+
MCSection *OffsetSection,
46+
MCSymbol *StartSym);
4547

4648
LLVM_ABI void emit(AsmPrinter &Asm, MCSection *StrSection,
47-
MCSection *OffsetSection = nullptr,
48-
bool UseRelativeOffsets = false);
49+
MCSection *OffsetSection = nullptr,
50+
bool UseRelativeOffsets = false);
4951

5052
bool empty() const { return Pool.empty(); }
5153

llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,8 @@ class MLocTracker {
790790
};
791791

792792
LLVM_ABI MLocTracker(MachineFunction &MF, const TargetInstrInfo &TII,
793-
const TargetRegisterInfo &TRI, const TargetLowering &TLI);
793+
const TargetRegisterInfo &TRI,
794+
const TargetLowering &TLI);
794795

795796
/// Produce location ID number for a Register. Provides some small amount of
796797
/// type safety.
@@ -1353,9 +1354,10 @@ class InstrRefBasedLDV : public LDVImpl {
13531354
/// live-out arrays to the (initialized to zero) multidimensional arrays in
13541355
/// \p MInLocs and \p MOutLocs. The outer dimension is indexed by block
13551356
/// number, the inner by LocIdx.
1356-
LLVM_ABI void buildMLocValueMap(MachineFunction &MF, FuncValueTable &MInLocs,
1357-
FuncValueTable &MOutLocs,
1358-
SmallVectorImpl<MLocTransferMap> &MLocTransfer);
1357+
LLVM_ABI void
1358+
buildMLocValueMap(MachineFunction &MF, FuncValueTable &MInLocs,
1359+
FuncValueTable &MOutLocs,
1360+
SmallVectorImpl<MLocTransferMap> &MLocTransfer);
13591361

13601362
/// Examine the stack indexes (i.e. offsets within the stack) to find the
13611363
/// basic units of interference -- like reg units, but for the stack.
@@ -1364,9 +1366,9 @@ class InstrRefBasedLDV : public LDVImpl {
13641366
/// Install PHI values into the live-in array for each block, according to
13651367
/// the IDF of each register.
13661368
LLVM_ABI void placeMLocPHIs(MachineFunction &MF,
1367-
SmallPtrSetImpl<MachineBasicBlock *> &AllBlocks,
1368-
FuncValueTable &MInLocs,
1369-
SmallVectorImpl<MLocTransferMap> &MLocTransfer);
1369+
SmallPtrSetImpl<MachineBasicBlock *> &AllBlocks,
1370+
FuncValueTable &MInLocs,
1371+
SmallVectorImpl<MLocTransferMap> &MLocTransfer);
13701372

13711373
/// Propagate variable values to blocks in the common case where there's
13721374
/// only one value assigned to the variable. This function has better
@@ -1423,12 +1425,13 @@ class InstrRefBasedLDV : public LDVImpl {
14231425
/// \p AssignBlocks contains the set of blocks that aren't in \p DILoc's
14241426
/// scope, but which do contain DBG_VALUEs, which VarLocBasedImpl tracks
14251427
/// locations through.
1426-
LLVM_ABI void buildVLocValueMap(const DILocation *DILoc,
1427-
const SmallSet<DebugVariableID, 4> &VarsWeCareAbout,
1428-
SmallPtrSetImpl<MachineBasicBlock *> &AssignBlocks,
1429-
LiveInsT &Output, FuncValueTable &MOutLocs,
1430-
FuncValueTable &MInLocs,
1431-
SmallVectorImpl<VLocTracker> &AllTheVLocs);
1428+
LLVM_ABI void
1429+
buildVLocValueMap(const DILocation *DILoc,
1430+
const SmallSet<DebugVariableID, 4> &VarsWeCareAbout,
1431+
SmallPtrSetImpl<MachineBasicBlock *> &AssignBlocks,
1432+
LiveInsT &Output, FuncValueTable &MOutLocs,
1433+
FuncValueTable &MInLocs,
1434+
SmallVectorImpl<VLocTracker> &AllTheVLocs);
14321435

14331436
/// Attempt to eliminate un-necessary PHIs on entry to a block. Examines the
14341437
/// live-in values coming from predecessors live-outs, and replaces any PHIs
@@ -1437,9 +1440,10 @@ class InstrRefBasedLDV : public LDVImpl {
14371440
/// \p LiveIn Old live-in value, overwritten with new one if live-in changes.
14381441
/// \returns true if any live-ins change value, either from value propagation
14391442
/// or PHI elimination.
1440-
LLVM_ABI bool vlocJoin(MachineBasicBlock &MBB, LiveIdxT &VLOCOutLocs,
1441-
SmallPtrSet<const MachineBasicBlock *, 8> &BlocksToExplore,
1442-
DbgValue &LiveIn);
1443+
LLVM_ABI bool
1444+
vlocJoin(MachineBasicBlock &MBB, LiveIdxT &VLOCOutLocs,
1445+
SmallPtrSet<const MachineBasicBlock *, 8> &BlocksToExplore,
1446+
DbgValue &LiveIn);
14431447

14441448
/// For the given block and live-outs feeding into it, try to find
14451449
/// machine locations for each debug operand where all the values feeding

llvm/lib/CodeGen/MLRegAllocEvictAdvisor.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ LLVM_ABI void extractInstructionFeatures(
4242
const int MBBFreqIndex, const int MBBMappingIndex,
4343
const SlotIndex LastIndex);
4444

45-
LLVM_ABI void extractMBBFrequency(const SlotIndex CurrentIndex,
46-
const size_t CurrentInstructionIndex,
47-
std::map<MachineBasicBlock *, size_t> &VisitedMBBs,
48-
function_ref<float(SlotIndex)> GetMBBFreq,
49-
MachineBasicBlock *CurrentMBBReference,
50-
MLModelRunner *RegallocRunner, const int MBBFreqIndex,
51-
const int MBBMappingIndex);
45+
LLVM_ABI void extractMBBFrequency(
46+
const SlotIndex CurrentIndex, const size_t CurrentInstructionIndex,
47+
std::map<MachineBasicBlock *, size_t> &VisitedMBBs,
48+
function_ref<float(SlotIndex)> GetMBBFreq,
49+
MachineBasicBlock *CurrentMBBReference, MLModelRunner *RegallocRunner,
50+
const int MBBFreqIndex, const int MBBMappingIndex);
5251

5352
// This is the maximum number of interfererring ranges. That's the number of
5453
// distinct AllocationOrder values, which comes from MCRegisterClass::RegsSize.

llvm/lib/CodeGen/MachineDominators.cpp

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,28 @@ static cl::opt<bool, true> VerifyMachineDomInfoX(
3737

3838
namespace llvm {
3939
template class LLVM_EXPORT_TEMPLATE DomTreeNodeBase<MachineBasicBlock>;
40-
template class LLVM_EXPORT_TEMPLATE DominatorTreeBase<MachineBasicBlock, false>; // DomTreeBase
40+
template class LLVM_EXPORT_TEMPLATE
41+
DominatorTreeBase<MachineBasicBlock, false>; // DomTreeBase
4142

4243
namespace DomTreeBuilder {
4344
template LLVM_EXPORT_TEMPLATE void Calculate<MBBDomTree>(MBBDomTree &DT);
44-
template LLVM_EXPORT_TEMPLATE void CalculateWithUpdates<MBBDomTree>(MBBDomTree &DT, MBBUpdates U);
45+
template LLVM_EXPORT_TEMPLATE void
46+
CalculateWithUpdates<MBBDomTree>(MBBDomTree &DT, MBBUpdates U);
4547

46-
template LLVM_EXPORT_TEMPLATE void InsertEdge<MBBDomTree>(MBBDomTree &DT, MachineBasicBlock *From,
47-
MachineBasicBlock *To);
48+
template LLVM_EXPORT_TEMPLATE void
49+
InsertEdge<MBBDomTree>(MBBDomTree &DT, MachineBasicBlock *From,
50+
MachineBasicBlock *To);
4851

49-
template LLVM_EXPORT_TEMPLATE void DeleteEdge<MBBDomTree>(MBBDomTree &DT, MachineBasicBlock *From,
50-
MachineBasicBlock *To);
52+
template LLVM_EXPORT_TEMPLATE void
53+
DeleteEdge<MBBDomTree>(MBBDomTree &DT, MachineBasicBlock *From,
54+
MachineBasicBlock *To);
5155

52-
template LLVM_EXPORT_TEMPLATE void ApplyUpdates<MBBDomTree>(MBBDomTree &DT, MBBDomTreeGraphDiff &,
53-
MBBDomTreeGraphDiff *);
56+
template LLVM_EXPORT_TEMPLATE void
57+
ApplyUpdates<MBBDomTree>(MBBDomTree &DT, MBBDomTreeGraphDiff &,
58+
MBBDomTreeGraphDiff *);
5459

55-
template LLVM_EXPORT_TEMPLATE bool Verify<MBBDomTree>(const MBBDomTree &DT,
56-
MBBDomTree::VerificationLevel VL);
60+
template LLVM_EXPORT_TEMPLATE bool
61+
Verify<MBBDomTree>(const MBBDomTree &DT, MBBDomTree::VerificationLevel VL);
5762
} // namespace DomTreeBuilder
5863
}
5964

llvm/lib/CodeGen/MachineLoopInfo.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@
2828
using namespace llvm;
2929

3030
// Explicitly instantiate methods in LoopInfoImpl.h for MI-level Loops.
31-
template class LLVM_EXPORT_TEMPLATE llvm::LoopBase<MachineBasicBlock, MachineLoop>;
32-
template class LLVM_EXPORT_TEMPLATE llvm::LoopInfoBase<MachineBasicBlock, MachineLoop>;
31+
template class LLVM_EXPORT_TEMPLATE
32+
llvm::LoopBase<MachineBasicBlock, MachineLoop>;
33+
template class LLVM_EXPORT_TEMPLATE
34+
llvm::LoopInfoBase<MachineBasicBlock, MachineLoop>;
3335

3436
AnalysisKey MachineLoopAnalysis::Key;
3537

llvm/lib/CodeGen/MachinePassManager.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ AnalysisKey FunctionAnalysisManagerMachineFunctionProxy::Key;
2626
namespace llvm {
2727
template class LLVM_EXPORT_TEMPLATE AnalysisManager<MachineFunction>;
2828
template class PassManager<MachineFunction>;
29-
template class LLVM_EXPORT_TEMPLATE InnerAnalysisManagerProxy<MachineFunctionAnalysisManager,
30-
Module>;
31-
template class LLVM_EXPORT_TEMPLATE InnerAnalysisManagerProxy<MachineFunctionAnalysisManager,
32-
Function>;
33-
template class LLVM_EXPORT_TEMPLATE OuterAnalysisManagerProxy<ModuleAnalysisManager,
34-
MachineFunction>;
29+
template class LLVM_EXPORT_TEMPLATE
30+
InnerAnalysisManagerProxy<MachineFunctionAnalysisManager, Module>;
31+
template class LLVM_EXPORT_TEMPLATE
32+
InnerAnalysisManagerProxy<MachineFunctionAnalysisManager, Function>;
33+
template class LLVM_EXPORT_TEMPLATE
34+
OuterAnalysisManagerProxy<ModuleAnalysisManager, MachineFunction>;
3535
} // namespace llvm
3636

3737
bool FunctionAnalysisManagerMachineFunctionProxy::Result::invalidate(

llvm/lib/CodeGen/MachinePostDominators.cpp

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,25 @@
1818
using namespace llvm;
1919

2020
namespace llvm {
21-
template class LLVM_EXPORT_TEMPLATE DominatorTreeBase<MachineBasicBlock, true>; // PostDomTreeBase
21+
template class LLVM_EXPORT_TEMPLATE
22+
DominatorTreeBase<MachineBasicBlock, true>; // PostDomTreeBase
2223

2324
namespace DomTreeBuilder {
2425

25-
template LLVM_EXPORT_TEMPLATE void Calculate<MBBPostDomTree>(MBBPostDomTree &DT);
26-
template LLVM_EXPORT_TEMPLATE void InsertEdge<MBBPostDomTree>(MBBPostDomTree &DT,
27-
MachineBasicBlock *From,
28-
MachineBasicBlock *To);
29-
template LLVM_EXPORT_TEMPLATE void DeleteEdge<MBBPostDomTree>(MBBPostDomTree &DT,
30-
MachineBasicBlock *From,
31-
MachineBasicBlock *To);
32-
template LLVM_EXPORT_TEMPLATE void ApplyUpdates<MBBPostDomTree>(MBBPostDomTree &DT,
33-
MBBPostDomTreeGraphDiff &,
34-
MBBPostDomTreeGraphDiff *);
35-
template LLVM_EXPORT_TEMPLATE bool Verify<MBBPostDomTree>(const MBBPostDomTree &DT,
36-
MBBPostDomTree::VerificationLevel VL);
26+
template LLVM_EXPORT_TEMPLATE void
27+
Calculate<MBBPostDomTree>(MBBPostDomTree &DT);
28+
template LLVM_EXPORT_TEMPLATE void
29+
InsertEdge<MBBPostDomTree>(MBBPostDomTree &DT, MachineBasicBlock *From,
30+
MachineBasicBlock *To);
31+
template LLVM_EXPORT_TEMPLATE void
32+
DeleteEdge<MBBPostDomTree>(MBBPostDomTree &DT, MachineBasicBlock *From,
33+
MachineBasicBlock *To);
34+
template LLVM_EXPORT_TEMPLATE void
35+
ApplyUpdates<MBBPostDomTree>(MBBPostDomTree &DT, MBBPostDomTreeGraphDiff &,
36+
MBBPostDomTreeGraphDiff *);
37+
template LLVM_EXPORT_TEMPLATE bool
38+
Verify<MBBPostDomTree>(const MBBPostDomTree &DT,
39+
MBBPostDomTree::VerificationLevel VL);
3740

3841
} // namespace DomTreeBuilder
3942
extern bool VerifyMachineDomInfo;

llvm/lib/CodeGen/RegAllocScore.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@
2323
#include "llvm/Support/CommandLine.h"
2424

2525
using namespace llvm;
26-
LLVM_ABI cl::opt<double> CopyWeight("regalloc-copy-weight", cl::init(0.2), cl::Hidden);
27-
LLVM_ABI cl::opt<double> LoadWeight("regalloc-load-weight", cl::init(4.0), cl::Hidden);
28-
LLVM_ABI cl::opt<double> StoreWeight("regalloc-store-weight", cl::init(1.0), cl::Hidden);
29-
LLVM_ABI cl::opt<double> CheapRematWeight("regalloc-cheap-remat-weight", cl::init(0.2),
30-
cl::Hidden);
26+
LLVM_ABI cl::opt<double> CopyWeight("regalloc-copy-weight", cl::init(0.2),
27+
cl::Hidden);
28+
LLVM_ABI cl::opt<double> LoadWeight("regalloc-load-weight", cl::init(4.0),
29+
cl::Hidden);
30+
LLVM_ABI cl::opt<double> StoreWeight("regalloc-store-weight", cl::init(1.0),
31+
cl::Hidden);
32+
LLVM_ABI cl::opt<double> CheapRematWeight("regalloc-cheap-remat-weight",
33+
cl::init(0.2), cl::Hidden);
3134
LLVM_ABI cl::opt<double> ExpensiveRematWeight("regalloc-expensive-remat-weight",
32-
cl::init(1.0), cl::Hidden);
35+
cl::init(1.0), cl::Hidden);
3336
#define DEBUG_TYPE "regalloc-score"
3437

3538
RegAllocScore &RegAllocScore::operator+=(const RegAllocScore &Other) {

llvm/lib/CodeGen/RegAllocScore.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ class RegAllocScore final {
6161
/// Calculate a score. When comparing 2 scores for the same function but
6262
/// different policies, the better policy would have a smaller score.
6363
/// The implementation is the overload below (which is also easily unittestable)
64-
LLVM_ABI RegAllocScore calculateRegAllocScore(const MachineFunction &MF,
65-
const MachineBlockFrequencyInfo &MBFI);
64+
LLVM_ABI RegAllocScore calculateRegAllocScore(
65+
const MachineFunction &MF, const MachineBlockFrequencyInfo &MBFI);
6666

6767
/// Implementation of the above, which is also more easily unittestable.
6868
LLVM_ABI RegAllocScore calculateRegAllocScore(

0 commit comments

Comments
 (0)