Skip to content

Commit 7dc3575

Browse files
[llvm] Remove redundant return and continue statements (NFC)
Identified with readability-redundant-control-flow.
1 parent 2efcbe2 commit 7dc3575

29 files changed

+0
-37
lines changed

llvm/include/llvm/CodeGen/LiveRegUnits.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ class LiveRegUnits {
6767
UsedRegUnits.addReg(Reg);
6868
}
6969
}
70-
return;
7170
}
7271

7372
/// Initialize and clear the set.

llvm/lib/CodeGen/MachinePipeliner.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,6 @@ void SwingSchedulerDAG::checkNodeSets(NodeSetType &NodeSets) {
17511751
}
17521752
NodeSets.clear();
17531753
LLVM_DEBUG(dbgs() << "Clear recurrence node-sets\n");
1754-
return;
17551754
}
17561755

17571756
/// Add the nodes that do not belong to a recurrence set into groups

llvm/lib/Demangle/MicrosoftDemangleNodes.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,5 +649,4 @@ void SpecialTableSymbolNode::output(OutputStream &OS, OutputFlags Flags) const {
649649
TargetName->output(OS, Flags);
650650
OS << "'}";
651651
}
652-
return;
653652
}

llvm/lib/FileCheck/FileCheck.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,6 @@ bool FileCheckString::CheckNot(const SourceMgr &SM, StringRef Buffer,
23182318
PrintMatch(false, SM, Prefix, Pat->getLoc(), *Pat, 1, Buffer, Pos, MatchLen,
23192319
Req, Diags);
23202320
DirectiveFail = true;
2321-
continue;
23222321
}
23232322

23242323
return DirectiveFail;

llvm/lib/IR/AutoUpgrade.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,6 @@ void llvm::UpgradeInlineAsmString(std::string *AsmStr) {
17691769
(Pos = AsmStr->find("# marker")) != std::string::npos) {
17701770
AsmStr->replace(Pos, 1, ";");
17711771
}
1772-
return;
17731772
}
17741773

17751774
/// Upgrade a call to an old intrinsic. All argument and return casting must be

llvm/lib/Passes/StandardInstrumentations.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,6 @@ void PrintIRInstrumentation::printBeforePass(StringRef PassID, Any IR) {
501501

502502
SmallString<20> Banner = formatv("*** IR Dump Before {0} ***", PassID);
503503
unwrapAndPrint(dbgs(), IR, Banner, forcePrintModuleIR());
504-
return;
505504
}
506505

507506
void PrintIRInstrumentation::printAfterPass(StringRef PassID, Any IR) {

llvm/lib/Support/Unix/Path.inc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,6 @@ void expand_tilde(const Twine &path, SmallVectorImpl<char> &dest) {
685685

686686
path.toVector(dest);
687687
expandTildeExpr(dest);
688-
689-
return;
690688
}
691689

692690
static file_type typeForMode(mode_t Mode) {

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3955,7 +3955,6 @@ void selectGatherScatterAddrMode(SDValue &BasePtr, SDValue &Index, EVT MemVT,
39553955
Opcode = NewOp;
39563956
BasePtr = Index->getOperand(0);
39573957
Index = ConstOffset;
3958-
return;
39593958
}
39603959

39613960
SDValue AArch64TargetLowering::LowerMGATHER(SDValue Op,

llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1873,7 +1873,6 @@ void AArch64InstructionSelector::materializeLargeCMVal(
18731873
AArch64II::MO_G1 | AArch64II::MO_NC, 16, 0);
18741874
DstReg = BuildMovK(DstReg, AArch64II::MO_G2 | AArch64II::MO_NC, 32, 0);
18751875
BuildMovK(DstReg, AArch64II::MO_G3, 48, I.getOperand(0).getReg());
1876-
return;
18771876
}
18781877

18791878
bool AArch64InstructionSelector::preISelLower(MachineInstr &I) {

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ void AMDGPUAsmBackend::relaxInstruction(MCInst &Inst,
5858
Res.setOpcode(RelaxedOpcode);
5959
Res.addOperand(Inst.getOperand(0));
6060
Inst = std::move(Res);
61-
return;
6261
}
6362

6463
bool AMDGPUAsmBackend::fixupNeedsRelaxation(const MCFixup &Fixup,

0 commit comments

Comments
 (0)