[llvm] Remove redundant control flow statements (NFC) (#115831)

Identified with readability-redundant-control-flow.
This commit is contained in:
Kazu Hirata 2024-11-12 10:09:42 -08:00 committed by GitHub
parent c784d321d9
commit 4048c64306
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 0 additions and 34 deletions

View File

@ -468,7 +468,6 @@ public:
/// Callback before changing MCInstrDesc. This should not modify the MI
/// directly.
virtual void MF_HandleChangeDesc(MachineInstr &MI, const MCInstrDesc &TID) {
return;
}
};

View File

@ -3551,7 +3551,6 @@ void IRTranslator::translateDbgValueRecord(Value *V, bool HasArgList,
// pretty baked in right now.
MIRBuilder.buildDirectDbgValue(Reg, Variable, Expression);
}
return;
}
void IRTranslator::translateDbgDeclareRecord(Value *Address, bool HasArgList,

View File

@ -1223,7 +1223,6 @@ void SelectionDAGBuilder::handleDebugDeclare(Value *Address,
<< " (could not emit func-arg dbg_value)\n");
}
}
return;
}
void SelectionDAGBuilder::visitDbgInfo(const Instruction &I) {

View File

@ -4679,7 +4679,6 @@ void AssemblyWriter::printDbgMarker(const DbgMarker &Marker) {
Out << " DbgMarker -> { ";
printInstruction(*Marker.MarkedInstr);
Out << " }";
return;
}
void AssemblyWriter::printDbgRecord(const DbgRecord &DR) {

View File

@ -798,8 +798,6 @@ void BasicBlock::spliceDebugInfoEmptyBlock(BasicBlock::iterator Dest,
return;
createMarker(Dest)->absorbDebugValues(*First->DebugMarker, InsertAtHead);
return;
}
void BasicBlock::spliceDebugInfo(BasicBlock::iterator Dest, BasicBlock *Src,

View File

@ -1242,7 +1242,6 @@ Error WasmObjectFile::parseTypeSection(ReadContext &Ctx) {
while (ParamCount--) {
uint32_t ParamType = readUint8(Ctx);
Sig.Params.push_back(parseValType(Ctx, ParamType));
continue;
}
uint32_t ReturnCount = readVaruint32(Ctx);
while (ReturnCount--) {

View File

@ -745,7 +745,6 @@ void emitDebugNamesHeader(raw_ostream &OS, bool IsLittleEndian,
writeInteger(AbbrevSize, OS, IsLittleEndian);
writeInteger(uint32_t(AugmentationString.size()), OS, IsLittleEndian);
OS.write(AugmentationString.data(), AugmentationString.size());
return;
}
/// Emits the abbreviations for a DebugNames section.

View File

@ -2547,7 +2547,6 @@ void DroppedVariableStats::runBeforePass(StringRef PassID, Any IR) {
return this->runOnModule(M, true);
if (auto *F = unwrapIR<Function>(IR))
return this->runOnFunction(F, true);
return;
}
void DroppedVariableStats::runOnFunction(const Function *F, bool Before) {
@ -2661,7 +2660,6 @@ void DroppedVariableStats::runAfterPass(StringRef PassID, Any IR,
DebugVariablesStack.pop_back();
InlinedAts.pop_back();
return;
}
bool DroppedVariableStats::isScopeChildOfOrEqualTo(DIScope *Scope,

View File

@ -3947,7 +3947,6 @@ void IEEEFloat::initFromFloat8E8M0FNUAPInt(const APInt &api) {
// Handle fcNormal...
category = fcNormal;
exponent = myexponent - 127; // 127 is bias
return;
}
template <const fltSemantics &S>
void IEEEFloat::initFromIEEEAPInt(const APInt &api) {

View File

@ -1533,7 +1533,6 @@ void AArch64DAGToDAGISel::SelectPtrauthAuth(SDNode *N) {
SDNode *AUT = CurDAG->getMachineNode(AArch64::AUT, DL, MVT::i64, Ops);
ReplaceNode(N, AUT);
return;
}
void AArch64DAGToDAGISel::SelectPtrauthResign(SDNode *N) {
@ -1567,7 +1566,6 @@ void AArch64DAGToDAGISel::SelectPtrauthResign(SDNode *N) {
SDNode *AUTPAC = CurDAG->getMachineNode(AArch64::AUTPAC, DL, MVT::i64, Ops);
ReplaceNode(N, AUTPAC);
return;
}
bool AArch64DAGToDAGISel::tryIndexedLoad(SDNode *N) {

View File

@ -178,7 +178,6 @@ static void instrumentAddressImpl(Module &M, IRBuilder<> &IRB,
generateCrashCode(M, IRB, IntptrTy, CrashTerm, AddrLong, IsWrite,
AccessSizeIndex, SizeArgument, Recover);
Crash->setDebugLoc(OrigIns->getDebugLoc());
return;
}
void instrumentAddress(Module &M, IRBuilder<> &IRB, Instruction *OrigIns,

View File

@ -358,7 +358,6 @@ void AMDGPUSwLowerLDS::buildSwLDSGlobal(Function *Func) {
GlobalValue::SanitizerMetadata MD;
MD.NoAddress = true;
LDSParams.SwLDS->setSanitizerMetadata(MD);
return;
}
void AMDGPUSwLowerLDS::buildSwDynLDSGlobal(Function *Func) {
@ -377,7 +376,6 @@ void AMDGPUSwLowerLDS::buildSwDynLDSGlobal(Function *Func) {
GlobalValue::SanitizerMetadata MD;
MD.NoAddress = true;
LDSParams.SwDynLDS->setSanitizerMetadata(MD);
return;
}
void AMDGPUSwLowerLDS::populateSwLDSAttributeAndMetadata(Function *Func) {
@ -496,7 +494,6 @@ void AMDGPUSwLowerLDS::populateSwMetadataGlobal(Function *Func) {
GlobalValue::SanitizerMetadata MD;
MD.NoAddress = true;
LDSParams.SwLDSMetadata->setSanitizerMetadata(MD);
return;
}
void AMDGPUSwLowerLDS::populateLDSToReplacementIndicesMap(Function *Func) {
@ -522,7 +519,6 @@ void AMDGPUSwLowerLDS::populateLDSToReplacementIndicesMap(Function *Func) {
PopulateIndices(LDSParams.IndirectAccess.StaticLDSGlobals, Idx);
PopulateIndices(LDSParams.DirectAccess.DynamicLDSGlobals, Idx);
PopulateIndices(LDSParams.IndirectAccess.DynamicLDSGlobals, Idx);
return;
}
static void replacesUsesOfGlobalInFunction(Function *Func, GlobalVariable *GV,
@ -1118,7 +1114,6 @@ void AMDGPUSwLowerLDS::initAsanInfo() {
false, &Offset, &Scale, &OrShadowOffset);
AsanInfo.Scale = Scale;
AsanInfo.Offset = Offset;
return;
}
bool AMDGPUSwLowerLDS::run() {

View File

@ -244,8 +244,6 @@ void AMDGPUInstPrinter::printScope(int64_t Scope, raw_ostream &O) {
O << "SCOPE_SYS";
else
llvm_unreachable("unexpected scope policy value");
return;
}
void AMDGPUInstPrinter::printDim(const MCInst *MI, unsigned OpNo,

View File

@ -14012,8 +14012,6 @@ static void placeSources(ByteProvider<SDValue> &Src0,
{*Src1.Src,
((Src1.SrcOffset % 4) << (8 * (3 - Step)) | (ZeroMask & ~FMask)),
Src1.SrcOffset / 4});
return;
}
static SDValue resolveSources(SelectionDAG &DAG, SDLoc SL,

View File

@ -998,7 +998,6 @@ void HexagonDAGToDAGISel::SelectFDiv(SDNode *N) {
FastFDiv(N);
else
FDiv(N);
return;
}
void HexagonDAGToDAGISel::Select(SDNode *N) {

View File

@ -5456,7 +5456,6 @@ void PPCInstrInfo::promoteInstr32To64ForElimEXTSW(const Register &Reg,
BuildMI(*MBB, ++Iter, DL, TII->get(PPC::COPY), SrcReg)
.addReg(NewDefinedReg, RegState::Kill, PPC::sub_32);
LV->recomputeForSingleDefVirtReg(NewDefinedReg);
return;
}
// The isSignOrZeroExtended function is recursive. The parameter BinOpDepth

View File

@ -500,7 +500,6 @@ bool PPCMIPeephole::simplifyCode() {
NumConvertedToImmediateForm++;
SomethingChanged = true;
Simplified = true;
continue;
}
}
} while (SomethingChanged && FixedPointRegToImm);

View File

@ -578,7 +578,6 @@ static void getOperandsForBranch(Register CondReg, RISCVCC::CondCode &CC,
}
CC = getRISCVCCFromICmp(Pred);
return;
}
bool RISCVInstructionSelector::select(MachineInstr &MI) {

View File

@ -9390,8 +9390,6 @@ static inline void promoteVCIXScalar(const SDValue &Op,
isa<ConstantSDNode>(ScalarOp) ? ISD::SIGN_EXTEND : ISD::ANY_EXTEND;
ScalarOp = DAG.getNode(ExtOpc, DL, XLenVT, ScalarOp);
}
return;
}
static void processVCIXOperands(SDValue &OrigOp,

View File

@ -2109,8 +2109,6 @@ void JumpThreadingPass::cloneInstructions(ValueToValueMapTy &ValueMapping,
for (DbgVariableRecord &DVR : filterDbgVars(DVRRange))
RetargetDbgVariableRecordIfPossible(&DVR);
}
return;
}
/// Attempt to thread through two successive basic blocks.

View File

@ -425,7 +425,6 @@ DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan(BasicBlock *BB) {
}
ToBeRemoved.push_back(&DVR);
continue;
}
// Sequence with consecutive dbg.value instrs ended. Clear the map to
// restart identifying redundant instructions if case we find another

View File

@ -1213,7 +1213,6 @@ void SourceCoverageViewHTML::renderMCDCView(raw_ostream &OS, MCDCView &MRV,
OS << EndPre;
OS << EndExpansionDiv;
}
return;
}
void SourceCoverageViewHTML::renderInstantiationView(raw_ostream &OS,

View File

@ -308,7 +308,6 @@ bool PatternParser::parseInstructionPatternMIFlags(InstructionPattern &IP,
return false;
FI.addUnsetFlag(R);
continue;
}
continue;