[llvm] [llvm] Always define dump() methods (PR #179468)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 3 06:12:35 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h,c -- llvm/bindings/ocaml/llvm/llvm_ocaml.c llvm/include/llvm/ADT/APFixedPoint.h llvm/include/llvm/ADT/APFloat.h llvm/include/llvm/ADT/APInt.h llvm/include/llvm/ADT/CoalescingBitVector.h llvm/include/llvm/ADT/DynamicAPInt.h llvm/include/llvm/ADT/SlowDynamicAPInt.h llvm/include/llvm/ADT/TrieRawHashMap.h llvm/include/llvm/ADT/Twine.h llvm/include/llvm/Analysis/DominanceFrontier.h llvm/include/llvm/Analysis/DominanceFrontierImpl.h llvm/include/llvm/Analysis/GenericDomTreeUpdaterImpl.h llvm/include/llvm/Analysis/HashRecognize.h llvm/include/llvm/Analysis/RegionInfo.h llvm/include/llvm/Analysis/RegionInfoImpl.h llvm/include/llvm/CodeGen/DbgEntityHistoryCalculator.h llvm/include/llvm/CodeGen/LatencyPriorityQueue.h llvm/include/llvm/CodeGen/LiveDebugVariables.h llvm/include/llvm/CodeGen/MachinePipeliner.h llvm/include/llvm/CodeGen/SelectionDAG.h llvm/include/llvm/CodeGen/TargetSchedule.h llvm/include/llvm/CodeGenTypes/LowLevelType.h llvm/include/llvm/DWARFLinker/Classic/DWARFLinkerCompileUnit.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVCompare.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVLocation.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVReader.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVStringPool.h llvm/include/llvm/DebugInfo/LogicalView/LVReaderHandler.h llvm/include/llvm/DebugInfo/LogicalView/Readers/LVBinaryReader.h llvm/include/llvm/DebugInfo/LogicalView/Readers/LVCodeViewReader.h llvm/include/llvm/DebugInfo/LogicalView/Readers/LVDWARFReader.h llvm/include/llvm/IR/Attributes.h llvm/include/llvm/IR/ConstantRangeList.h llvm/include/llvm/MC/MCAsmMacro.h llvm/include/llvm/Object/Wasm.h llvm/include/llvm/Support/BranchProbability.h llvm/include/llvm/Support/CFGDiff.h llvm/include/llvm/Support/CFGUpdate.h llvm/include/llvm/Support/Compiler.h llvm/include/llvm/Support/DebugCounter.h llvm/include/llvm/Support/GraphWriter.h llvm/include/llvm/Support/JSON.h llvm/include/llvm/Support/KnownBits.h llvm/include/llvm/Support/SMTAPI.h llvm/include/llvm/Support/VirtualFileSystem.h llvm/include/llvm/TextAPI/Symbol.h llvm/include/llvm/Transforms/Coroutines/SuspendCrossingInfo.h llvm/lib/Analysis/AliasSetTracker.cpp llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp llvm/lib/Analysis/CallGraph.cpp llvm/lib/Analysis/DXILMetadataAnalysis.cpp llvm/lib/Analysis/DXILResource.cpp llvm/lib/Analysis/DomTreeUpdater.cpp llvm/lib/Analysis/DominanceFrontier.cpp llvm/lib/Analysis/HashRecognize.cpp llvm/lib/Analysis/IVUsers.cpp llvm/lib/Analysis/InlineCost.cpp llvm/lib/Analysis/LazyCallGraph.cpp llvm/lib/Analysis/LoopInfo.cpp llvm/lib/Analysis/MemorySSA.cpp llvm/lib/Analysis/PHITransAddr.cpp llvm/lib/Analysis/RegionInfo.cpp llvm/lib/Analysis/ScalarEvolution.cpp llvm/lib/Analysis/StackLifetime.cpp llvm/lib/Analysis/Trace.cpp llvm/lib/Bitcode/Writer/ValueEnumerator.cpp llvm/lib/CodeGen/AsmPrinter/DIE.cpp llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h llvm/lib/CodeGen/BranchRelaxation.cpp llvm/lib/CodeGen/CodeGenPrepare.cpp llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp llvm/lib/CodeGen/InlineSpiller.cpp llvm/lib/CodeGen/LatencyPriorityQueue.cpp llvm/lib/CodeGen/LexicalScopes.cpp llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp llvm/lib/CodeGen/LiveDebugVariables.cpp llvm/lib/CodeGen/LiveInterval.cpp llvm/lib/CodeGen/LiveIntervals.cpp llvm/lib/CodeGen/LivePhysRegs.cpp llvm/lib/CodeGen/LiveVariables.cpp llvm/lib/CodeGen/MachineBasicBlock.cpp llvm/lib/CodeGen/MachineFrameInfo.cpp llvm/lib/CodeGen/MachineFunction.cpp llvm/lib/CodeGen/MachineInstr.cpp llvm/lib/CodeGen/MachineLoopInfo.cpp llvm/lib/CodeGen/MachineOperand.cpp llvm/lib/CodeGen/MachinePipeliner.cpp llvm/lib/CodeGen/MachineRegionInfo.cpp llvm/lib/CodeGen/MachineRegisterInfo.cpp llvm/lib/CodeGen/MachineScheduler.cpp llvm/lib/CodeGen/PostRASchedulerList.cpp llvm/lib/CodeGen/RegAllocPBQP.cpp llvm/lib/CodeGen/RegisterBank.cpp llvm/lib/CodeGen/RegisterBankInfo.cpp llvm/lib/CodeGen/RegisterPressure.cpp llvm/lib/CodeGen/ScheduleDAG.cpp llvm/lib/CodeGen/ScheduleDAGInstrs.cpp llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp llvm/lib/CodeGen/SlotIndexes.cpp llvm/lib/CodeGen/SplitKit.cpp llvm/lib/CodeGen/StackColoring.cpp llvm/lib/CodeGen/TargetRegisterInfo.cpp llvm/lib/CodeGen/ValueTypes.cpp llvm/lib/CodeGen/VirtRegMap.cpp llvm/lib/CodeGenTypes/LowLevelType.cpp llvm/lib/DWARFLinker/Classic/DWARFLinkerCompileUnit.cpp llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.h llvm/lib/DWARFLinker/Parallel/DependencyTracker.cpp llvm/lib/IR/AsmWriter.cpp llvm/lib/IR/Attributes.cpp llvm/lib/IR/ConstantFPRange.cpp llvm/lib/IR/ConstantRange.cpp llvm/lib/IR/ConstantRangeList.cpp llvm/lib/IR/DebugLoc.cpp llvm/lib/IR/Pass.cpp llvm/lib/IR/ValueSymbolTable.cpp llvm/lib/MC/MCAsmMacro.cpp llvm/lib/MC/MCAssembler.cpp llvm/lib/MC/MCExpr.cpp llvm/lib/MC/MCFragment.cpp llvm/lib/MC/MCInst.cpp llvm/lib/MC/MCLabel.cpp llvm/lib/MC/MCParser/MCAsmParser.cpp llvm/lib/MC/MCSection.cpp llvm/lib/MC/MCSymbol.cpp llvm/lib/MC/MCValue.cpp llvm/lib/MC/WasmObjectWriter.cpp llvm/lib/Object/WasmObjectFile.cpp llvm/lib/Option/Arg.cpp llvm/lib/Option/ArgList.cpp llvm/lib/Option/Option.cpp llvm/lib/ProfileData/GCOV.cpp llvm/lib/ProfileData/SampleProf.cpp llvm/lib/Support/APFixedPoint.cpp llvm/lib/Support/APFloat.cpp llvm/lib/Support/APInt.cpp llvm/lib/Support/BranchProbability.cpp llvm/lib/Support/DebugCounter.cpp llvm/lib/Support/DynamicAPInt.cpp llvm/lib/Support/JSON.cpp llvm/lib/Support/KnownBits.cpp llvm/lib/Support/SlowDynamicAPInt.cpp llvm/lib/Support/Twine.cpp llvm/lib/Support/VirtualFileSystem.cpp llvm/lib/Support/Z3Solver.cpp llvm/lib/TableGen/Record.cpp llvm/lib/TableGen/TGParser.cpp llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp llvm/lib/Target/AMDGPU/GCNRegPressure.cpp llvm/lib/Target/AMDGPU/GCNRegPressure.h llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp llvm/lib/Target/AMDGPU/GCNSchedStrategy.h llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp llvm/lib/Target/ARC/ARCOptAddrMode.cpp llvm/lib/Target/ARM/ARMConstantIslandPass.cpp llvm/lib/Target/ARM/ARMConstantPoolValue.cpp llvm/lib/Target/ARM/ARMFrameLowering.cpp llvm/lib/Target/CSKY/CSKYConstantIslandPass.cpp llvm/lib/Target/DirectX/DXILWriter/DXILValueEnumerator.cpp llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp llvm/lib/Target/M68k/M68kISelDAGToDAG.cpp llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp llvm/lib/Target/Mips/MipsConstantIslandPass.cpp llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp llvm/lib/Target/RISCV/RISCVInsertWriteVXRM.cpp llvm/lib/Target/RISCV/RISCVVSETVLIInfoAnalysis.h llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp llvm/lib/Target/X86/X86FloatingPoint.cpp llvm/lib/Target/X86/X86ISelDAGToDAG.cpp llvm/lib/Target/Xtensa/XtensaConstantPoolValue.cpp llvm/lib/Target/Xtensa/XtensaConstantPoolValue.h llvm/lib/TargetParser/SubtargetFeature.cpp llvm/lib/TextAPI/Symbol.cpp llvm/lib/Transforms/Coroutines/MaterializationUtils.cpp llvm/lib/Transforms/Coroutines/SuspendCrossingInfo.cpp llvm/lib/Transforms/Scalar/GVN.cpp llvm/lib/Transforms/Scalar/LoopFuse.cpp llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp llvm/lib/Transforms/Scalar/SROA.cpp llvm/lib/Transforms/Utils/SplitModuleByCategory.cpp llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp llvm/lib/Transforms/Vectorize/VPlan.cpp llvm/lib/Transforms/Vectorize/VPlan.h llvm/lib/Transforms/Vectorize/VPlanHelpers.h llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp llvm/lib/Transforms/Vectorize/VPlanSLP.cpp llvm/lib/Transforms/Vectorize/VPlanSLP.h llvm/lib/Transforms/Vectorize/VPlanTransforms.h llvm/lib/Transforms/Vectorize/VPlanValue.h llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp llvm/unittests/Transforms/Vectorize/VPlanTest.cpp llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp llvm/utils/TableGen/AsmMatcherEmitter.cpp llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp llvm/utils/TableGen/Common/SubtargetFeatureInfo.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Analysis/RegionInfoImpl.h b/llvm/include/llvm/Analysis/RegionInfoImpl.h
index 336bc5de2..d60b8bdb3 100644
--- a/llvm/include/llvm/Analysis/RegionInfoImpl.h
+++ b/llvm/include/llvm/Analysis/RegionInfoImpl.h
@@ -752,8 +752,7 @@ void RegionInfoBase<Tr>::print(raw_ostream &OS) const {
OS << "End region tree\n";
}
-template <class Tr>
-void RegionInfoBase<Tr>::dump() const { print(dbgs()); }
+template <class Tr> void RegionInfoBase<Tr>::dump() const { print(dbgs()); }
template <class Tr> void RegionInfoBase<Tr>::releaseMemory() {
BBtoRegion.clear();
diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp
index fad79349c..9d30b76af 100644
--- a/llvm/lib/Analysis/MemorySSA.cpp
+++ b/llvm/lib/Analysis/MemorySSA.cpp
@@ -2268,7 +2268,7 @@ void MemoryUse::print(raw_ostream &OS) const {
}
void MemoryAccess::dump() const {
-// Cannot completely remove virtual function even in release mode.
+ // Cannot completely remove virtual function even in release mode.
print(dbgs());
dbgs() << "\n";
}
diff --git a/llvm/lib/Analysis/RegionInfo.cpp b/llvm/lib/Analysis/RegionInfo.cpp
index 8e021c13a..91e5f80c3 100644
--- a/llvm/lib/Analysis/RegionInfo.cpp
+++ b/llvm/lib/Analysis/RegionInfo.cpp
@@ -150,9 +150,7 @@ void RegionInfoPass::print(raw_ostream &OS, const Module *) const {
RI.print(OS);
}
-LLVM_DUMP_METHOD void RegionInfoPass::dump() const {
- RI.dump();
-}
+LLVM_DUMP_METHOD void RegionInfoPass::dump() const { RI.dump(); }
char RegionInfoPass::ID = 0;
diff --git a/llvm/lib/Analysis/Trace.cpp b/llvm/lib/Analysis/Trace.cpp
index 019975c63..c8873540f 100644
--- a/llvm/lib/Analysis/Trace.cpp
+++ b/llvm/lib/Analysis/Trace.cpp
@@ -46,6 +46,4 @@ void Trace::print(raw_ostream &O) const {
/// dump - Debugger convenience method; writes trace to standard error
/// output stream.
-LLVM_DUMP_METHOD void Trace::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void Trace::dump() const { print(dbgs()); }
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
index cf59685e9..2fecd8efd 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -118,9 +118,7 @@ void DIEAbbrev::print(raw_ostream &O) const {
}
}
-LLVM_DUMP_METHOD void DIEAbbrev::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void DIEAbbrev::dump() const { print(dbgs()); }
//===----------------------------------------------------------------------===//
// DIEAbbrevSet Implementation
@@ -255,9 +253,7 @@ void DIE::print(raw_ostream &O, unsigned IndentCount) const {
O << "\n";
}
-LLVM_DUMP_METHOD void DIE::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void DIE::dump() const { print(dbgs()); }
unsigned DIE::computeOffsetsAndAbbrevs(const dwarf::FormParams &FormParams,
DIEAbbrevSet &AbbrevSet,
@@ -345,9 +341,7 @@ void DIEValue::print(raw_ostream &O) const {
}
}
-LLVM_DUMP_METHOD void DIEValue::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void DIEValue::dump() const { print(dbgs()); }
//===----------------------------------------------------------------------===//
// DIEInteger Implementation
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp
index 5c59b8132..0f3f6c064 100644
--- a/llvm/lib/CodeGen/LiveInterval.cpp
+++ b/llvm/lib/CodeGen/LiveInterval.cpp
@@ -1052,9 +1052,7 @@ LLVM_DUMP_METHOD void LiveInterval::SubRange::dump() const {
dbgs() << *this << '\n';
}
-LLVM_DUMP_METHOD void LiveInterval::dump() const {
- dbgs() << *this << '\n';
-}
+LLVM_DUMP_METHOD void LiveInterval::dump() const { dbgs() << *this << '\n'; }
#ifndef NDEBUG
bool LiveRange::verify() const {
@@ -1171,9 +1169,7 @@ void LiveRangeUpdater::print(raw_ostream &OS) const {
OS << '\n';
}
-LLVM_DUMP_METHOD void LiveRangeUpdater::dump() const {
- print(errs());
-}
+LLVM_DUMP_METHOD void LiveRangeUpdater::dump() const { print(errs()); }
// Determine if A and B should be coalesced.
static inline bool coalescable(const LiveRange::Segment &A,
diff --git a/llvm/lib/CodeGen/LiveIntervals.cpp b/llvm/lib/CodeGen/LiveIntervals.cpp
index af7b5bfd2..f01c443e9 100644
--- a/llvm/lib/CodeGen/LiveIntervals.cpp
+++ b/llvm/lib/CodeGen/LiveIntervals.cpp
@@ -209,9 +209,7 @@ void LiveIntervals::printInstrs(raw_ostream &OS) const {
MF->print(OS, Indexes);
}
-LLVM_DUMP_METHOD void LiveIntervals::dumpInstrs() const {
- printInstrs(dbgs());
-}
+LLVM_DUMP_METHOD void LiveIntervals::dumpInstrs() const { printInstrs(dbgs()); }
LLVM_DUMP_METHOD void LiveIntervals::dump() const { print(dbgs()); }
diff --git a/llvm/lib/CodeGen/LivePhysRegs.cpp b/llvm/lib/CodeGen/LivePhysRegs.cpp
index 3c88acf4a..855569c3a 100644
--- a/llvm/lib/CodeGen/LivePhysRegs.cpp
+++ b/llvm/lib/CodeGen/LivePhysRegs.cpp
@@ -132,9 +132,7 @@ void LivePhysRegs::print(raw_ostream &OS) const {
OS << "\n";
}
-LLVM_DUMP_METHOD void LivePhysRegs::dump() const {
- dbgs() << " " << *this;
-}
+LLVM_DUMP_METHOD void LivePhysRegs::dump() const { dbgs() << " " << *this; }
bool LivePhysRegs::available(const MachineRegisterInfo &MRI,
MCRegister Reg) const {
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 0e8106da8..6c9527a4c 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -295,9 +295,7 @@ bool MachineBasicBlock::isEntryBlock() const {
return getParent()->begin() == getIterator();
}
-LLVM_DUMP_METHOD void MachineBasicBlock::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void MachineBasicBlock::dump() const { print(dbgs()); }
bool MachineBasicBlock::mayHaveInlineAsmBr() const {
for (const MachineBasicBlock *Succ : successors()) {
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index e23c07719..dd0e97ce6 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -636,9 +636,7 @@ ArrayRef<int> MachineFunction::allocateShuffleMask(ArrayRef<int> Mask) {
return {AllocMask, Mask.size()};
}
-LLVM_DUMP_METHOD void MachineFunction::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void MachineFunction::dump() const { print(dbgs()); }
StringRef MachineFunction::getName() const {
return getFunction().getName();
diff --git a/llvm/lib/CodeGen/MachineLoopInfo.cpp b/llvm/lib/CodeGen/MachineLoopInfo.cpp
index 927c7492c..6ddd22af6 100644
--- a/llvm/lib/CodeGen/MachineLoopInfo.cpp
+++ b/llvm/lib/CodeGen/MachineLoopInfo.cpp
@@ -287,6 +287,4 @@ bool MachineLoop::isLoopInvariant(MachineInstr &I,
return true;
}
-LLVM_DUMP_METHOD void MachineLoop::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void MachineLoop::dump() const { print(dbgs()); }
diff --git a/llvm/lib/CodeGen/MachineRegionInfo.cpp b/llvm/lib/CodeGen/MachineRegionInfo.cpp
index 60704d0ba..9804e3ae5 100644
--- a/llvm/lib/CodeGen/MachineRegionInfo.cpp
+++ b/llvm/lib/CodeGen/MachineRegionInfo.cpp
@@ -119,9 +119,7 @@ void MachineRegionInfoPass::print(raw_ostream &OS, const Module *) const {
RI.print(OS);
}
-LLVM_DUMP_METHOD void MachineRegionInfoPass::dump() const {
- RI.dump();
-}
+LLVM_DUMP_METHOD void MachineRegionInfoPass::dump() const { RI.dump(); }
char MachineRegionInfoPass::ID = 0;
char &llvm::MachineRegionInfoPassID = MachineRegionInfoPass::ID;
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index a7f2514fe..e7bf2603f 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -3165,7 +3165,6 @@ SUnit *SchedBoundary::pickOnlyChoice() {
return nullptr;
}
-
/// Dump the content of the \ref ReservedCycles vector for the
/// resources that are used in the basic block.
///
@@ -3711,8 +3710,7 @@ void GenericScheduler::dumpPolicy() const {
dbgs() << "GenericScheduler RegionPolicy: "
<< " ShouldTrackPressure=" << RegionPolicy.ShouldTrackPressure
<< " OnlyTopDown=" << RegionPolicy.OnlyTopDown
- << " OnlyBottomUp=" << RegionPolicy.OnlyBottomUp
- << "\n";
+ << " OnlyBottomUp=" << RegionPolicy.OnlyBottomUp << "\n";
}
/// Set IsAcyclicLatencyLimited if the acyclic path is longer than the cyclic
diff --git a/llvm/lib/CodeGen/RegisterPressure.cpp b/llvm/lib/CodeGen/RegisterPressure.cpp
index de3b748c7..aa76e969b 100644
--- a/llvm/lib/CodeGen/RegisterPressure.cpp
+++ b/llvm/lib/CodeGen/RegisterPressure.cpp
@@ -147,7 +147,6 @@ void RegPressureDelta::dump() const {
dbgs() << "]\n";
}
-
void RegPressureTracker::increaseRegPressure(VirtRegOrUnit VRegOrUnit,
LaneBitmask PreviousMask,
LaneBitmask NewMask) {
diff --git a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
index 6ba17890f..d7f097f45 100644
--- a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
+++ b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
@@ -1547,4 +1547,3 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const ILPValue &Val) {
Val.print(OS);
return OS;
}
-
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
index 83ef63f8e..07c1c3ace 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
@@ -308,7 +308,6 @@ BaseIndexOffset BaseIndexOffset::match(const SDNode *N,
return BaseIndexOffset();
}
-
LLVM_DUMP_METHOD void BaseIndexOffset::dump() const {
print(dbgs());
}
@@ -321,4 +320,3 @@ void BaseIndexOffset::print(raw_ostream& OS) const {
Index->print(OS);
OS << "] offset=" << Offset;
}
-
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp
index 6d3db2006..ae04b28a7 100644
--- a/llvm/lib/CodeGen/VirtRegMap.cpp
+++ b/llvm/lib/CodeGen/VirtRegMap.cpp
@@ -164,9 +164,7 @@ void VirtRegMap::print(raw_ostream &OS, const Module*) const {
OS << '\n';
}
-LLVM_DUMP_METHOD void VirtRegMap::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void VirtRegMap::dump() const { print(dbgs()); }
AnalysisKey VirtRegMapAnalysis::Key;
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index 49a107226..118b6225c 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -1508,7 +1508,6 @@ bool AttributeListImpl::hasAttrSomewhere(Attribute::AttrKind Kind,
return true;
}
-
LLVM_DUMP_METHOD void AttributeListImpl::dump() const {
AttributeList(const_cast<AttributeListImpl *>(this)).dump();
}
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp
index 6060158f6..56eae2b5e 100644
--- a/llvm/lib/IR/ConstantRange.cpp
+++ b/llvm/lib/IR/ConstantRange.cpp
@@ -2285,9 +2285,7 @@ void ConstantRange::print(raw_ostream &OS) const {
OS << "[" << Lower << "," << Upper << ")";
}
-LLVM_DUMP_METHOD void ConstantRange::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void ConstantRange::dump() const { print(dbgs()); }
ConstantRange llvm::getConstantRangeFromMetadata(const MDNode &Ranges) {
const unsigned NumRanges = Ranges.getNumOperands() / 2;
diff --git a/llvm/lib/IR/Pass.cpp b/llvm/lib/IR/Pass.cpp
index 99fe68571..25fa1b191 100644
--- a/llvm/lib/IR/Pass.cpp
+++ b/llvm/lib/IR/Pass.cpp
@@ -142,9 +142,7 @@ void Pass::print(raw_ostream &OS, const Module *) const {
}
// dump - call print(cerr);
-LLVM_DUMP_METHOD void Pass::dump() const {
- print(dbgs(), nullptr);
-}
+LLVM_DUMP_METHOD void Pass::dump() const { print(dbgs(), nullptr); }
#ifdef EXPENSIVE_CHECKS
uint64_t Pass::structuralHash(Module &M) const {
diff --git a/llvm/lib/MC/MCLabel.cpp b/llvm/lib/MC/MCLabel.cpp
index ea3f0e4bc..20b0ff348 100644
--- a/llvm/lib/MC/MCLabel.cpp
+++ b/llvm/lib/MC/MCLabel.cpp
@@ -18,6 +18,4 @@ void MCLabel::print(raw_ostream &OS) const {
OS << '"' << getInstance() << '"';
}
-LLVM_DUMP_METHOD void MCLabel::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void MCLabel::dump() const { print(dbgs()); }
diff --git a/llvm/lib/MC/MCValue.cpp b/llvm/lib/MC/MCValue.cpp
index 0eaa828f5..50de6b31a 100644
--- a/llvm/lib/MC/MCValue.cpp
+++ b/llvm/lib/MC/MCValue.cpp
@@ -37,6 +37,4 @@ void MCValue::print(raw_ostream &OS) const {
OS << " + " << getConstant();
}
-LLVM_DUMP_METHOD void MCValue::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void MCValue::dump() const { print(dbgs()); }
diff --git a/llvm/lib/Support/DebugCounter.cpp b/llvm/lib/Support/DebugCounter.cpp
index 42ed0102a..3ff9614a3 100644
--- a/llvm/lib/Support/DebugCounter.cpp
+++ b/llvm/lib/Support/DebugCounter.cpp
@@ -193,6 +193,4 @@ bool DebugCounter::shouldExecuteImpl(CounterInfo &Counter) {
return Res;
}
-LLVM_DUMP_METHOD void DebugCounter::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void DebugCounter::dump() const { print(dbgs()); }
diff --git a/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp b/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
index 120b29fdf..376097631 100644
--- a/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
@@ -109,7 +109,7 @@ public:
SetVector<unsigned> Siblings;
V2SCopyInfo() : Copy(nullptr), ID(0){};
V2SCopyInfo(unsigned Id, MachineInstr *C, unsigned Width)
- : Copy(C), NumReadfirstlanes(Width / 32), ID(Id){};
+ : Copy(C), NumReadfirstlanes(Width / 32), ID(Id) {};
void dump() const {
dbgs() << ID << " : " << *Copy << "\n\tS:" << SChain.size()
<< "\n\tSV:" << NumSVCopies << "\n\tSP: " << SiblingPenalty
diff --git a/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp b/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
index d9256ce32..4becb9ec8 100644
--- a/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
+++ b/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
@@ -154,7 +154,7 @@ public:
uint64_t getSrcMods(const SIInstrInfo *TII,
const MachineOperand *SrcOp) const;
- void print(raw_ostream& OS) const override;
+ void print(raw_ostream &OS) const override;
};
class SDWADstOperand : public SDWAOperand {
@@ -177,7 +177,7 @@ public:
SdwaSel getDstSel() const { return DstSel; }
DstUnused getDstUnused() const { return DstUn; }
- void print(raw_ostream& OS) const override;
+ void print(raw_ostream &OS) const override;
};
class SDWADstPreserveOperand : public SDWADstOperand {
@@ -196,7 +196,7 @@ public:
MachineOperand *getPreservedOperand() const { return Preserve; }
- void print(raw_ostream& OS) const override;
+ void print(raw_ostream &OS) const override;
};
} // end anonymous namespace
@@ -256,7 +256,6 @@ void SDWADstPreserveOperand::print(raw_ostream& OS) const {
<< " preserve:" << *getPreservedOperand() << '\n';
}
-
static void copyRegOperand(MachineOperand &To, const MachineOperand &From) {
assert(To.isReg() && From.isReg());
To.setReg(From.getReg());
diff --git a/llvm/lib/TargetParser/SubtargetFeature.cpp b/llvm/lib/TargetParser/SubtargetFeature.cpp
index e5d1a17c2..b6922c0bb 100644
--- a/llvm/lib/TargetParser/SubtargetFeature.cpp
+++ b/llvm/lib/TargetParser/SubtargetFeature.cpp
@@ -61,9 +61,7 @@ void SubtargetFeatures::print(raw_ostream &OS) const {
OS << "\n";
}
-LLVM_DUMP_METHOD void SubtargetFeatures::dump() const {
- print(dbgs());
-}
+LLVM_DUMP_METHOD void SubtargetFeatures::dump() const { print(dbgs()); }
void SubtargetFeatures::getDefaultSubtargetFeatures(const Triple& Triple) {
// FIXME: This is an inelegant way of specifying the features of a
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index dc5faaf4b..b771cee31 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -1448,9 +1448,8 @@ private:
};
AllocaSlices::AllocaSlices(const DataLayout &DL, AllocaInst &AI)
- :
- AI(AI),
- PointerEscapingInstr(nullptr), PointerEscapingInstrReadOnly(nullptr) {
+ : AI(AI), PointerEscapingInstr(nullptr),
+ PointerEscapingInstrReadOnly(nullptr) {
SliceBuilder PB(DL, AI, *this);
SliceBuilder::PtrInfo PtrI = PB.visitPtr(AI);
if (PtrI.isEscaped() || PtrI.isAborted()) {
@@ -1470,7 +1469,6 @@ AllocaSlices::AllocaSlices(const DataLayout &DL, AllocaInst &AI)
llvm::stable_sort(Slices);
}
-
void AllocaSlices::print(raw_ostream &OS, const_iterator I,
StringRef Indent) const {
printSlice(OS, I, Indent);
@@ -1511,7 +1509,6 @@ LLVM_DUMP_METHOD void AllocaSlices::dump(const_iterator I) const {
}
LLVM_DUMP_METHOD void AllocaSlices::dump() const { print(dbgs()); }
-
/// Walk the range of a partitioning looking for a common type to cover this
/// sequence of slices.
static std::pair<Type *, IntegerType *>
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index 7d82f2271..5a2757031 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -1238,7 +1238,6 @@ VPIRBasicBlock *VPlan::createVPIRBasicBlock(BasicBlock *IRBB) {
return VPIRBB;
}
-
Twine VPlanPrinter::getUID(const VPBlockBase *Block) {
return (isa<VPRegionBlock>(Block) ? "cluster_N" : "N") +
Twine(getOrCreateBID(Block));
@@ -1367,7 +1366,6 @@ void VPlanPrinter::dumpRegion(const VPRegionBlock *Region) {
dumpEdges(Region);
}
-
/// Returns true if there is a vector loop region and \p VPV is defined in a
/// loop region.
static bool isDefinedInsideLoopRegions(const VPValue *VPV) {
diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 41c34a9ad..2cc3d8db4 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -3003,7 +3003,6 @@ bool VPExpressionRecipe::isSingleScalar() const {
return RR && !RR->isPartialReduction();
}
-
void VPExpressionRecipe::printRecipe(raw_ostream &O, const Twine &Indent,
VPSlotTracker &SlotTracker) const {
O << Indent << "EXPRESSION ";
@@ -3137,7 +3136,6 @@ void VPReductionEVLRecipe::printRecipe(raw_ostream &O, const Twine &Indent,
O << ")";
}
-
/// A helper function to scalarize a single Instruction in the innermost loop.
/// Generates a sequence of scalar instances for lane \p Lane. Uses the VPValue
/// operands from \p RepRecipe instead of \p Instr's operands.
diff --git a/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp b/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
index a9bc83ce7..2a525f427 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
@@ -1612,7 +1612,6 @@ TEST_F(VPRecipeTest, dumpRecipeUnnamedVPValuesNotInPlanOrBlock) {
delete AI;
}
-
TEST_F(VPRecipeTest, CastVPReductionRecipeToVPUser) {
IntegerType *Int32 = IntegerType::get(C, 32);
VPValue *ChainOp = getPlan().getOrAddLiveIn(ConstantInt::get(Int32, 1));
``````````
</details>
https://github.com/llvm/llvm-project/pull/179468
More information about the llvm-commits
mailing list