Skip to content

Commit aa61377

Browse files
[llvm] Remove redundant control flow (NFC) (#138304)
1 parent 173ec72 commit aa61377

File tree

9 files changed

+4
-17
lines changed

9 files changed

+4
-17
lines changed

llvm/lib/Analysis/KernelInfo.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,6 @@ void KernelInfo::emitKernelInfo(Function &F, FunctionAnalysisManager &FAM,
313313
REMARK_PROPERTY(Invokes);
314314
REMARK_PROPERTY(FlatAddrspaceAccesses);
315315
#undef REMARK_PROPERTY
316-
317-
return;
318316
}
319317

320318
PreservedAnalyses KernelInfoPrinter::run(Function &F,

llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3597,9 +3597,8 @@ void IRTranslator::translateDbgDeclareRecord(Value *Address, bool HasArgList,
35973597
// A dbg.declare describes the address of a source variable, so lower it
35983598
// into an indirect DBG_VALUE.
35993599
MIRBuilder.setDebugLoc(DL);
3600-
MIRBuilder.buildIndirectDbgValue(getOrCreateVReg(*Address),
3601-
Variable, Expression);
3602-
return;
3600+
MIRBuilder.buildIndirectDbgValue(getOrCreateVReg(*Address), Variable,
3601+
Expression);
36033602
}
36043603

36053604
void IRTranslator::translateDbgInfo(const Instruction &Inst,

llvm/lib/CodeGen/PeepholeOptimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ class PeepholeOptimizer : private MachineFunction::Delegate {
521521
DenseMap<RegSubRegPair, MachineInstr *> CopySrcMIs;
522522

523523
// MachineFunction::Delegate implementation. Used to maintain CopySrcMIs.
524-
void MF_HandleInsertion(MachineInstr &MI) override { return; }
524+
void MF_HandleInsertion(MachineInstr &MI) override {}
525525

526526
bool getCopySrc(MachineInstr &MI, RegSubRegPair &SrcPair) {
527527
if (!MI.isCopy())

llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,6 @@ void DWARFVerifier::verifyNameIndexBuckets(const DWARFDebugNames::NameIndex &NI,
13891389
}
13901390
NextUncovered = std::max(NextUncovered, Idx);
13911391
}
1392-
return;
13931392
}
13941393

13951394
void DWARFVerifier::verifyNameIndexAttribute(
@@ -1469,7 +1468,6 @@ void DWARFVerifier::verifyNameIndexAttribute(
14691468
});
14701469
return;
14711470
}
1472-
return;
14731471
}
14741472

14751473
void DWARFVerifier::verifyNameIndexAbbrevs(
@@ -2068,7 +2066,6 @@ void DWARFVerifier::verifyDebugNames(const DWARFSection &AccelSection,
20682066
}
20692067
}
20702068
}
2071-
return;
20722069
}
20732070

20742071
bool DWARFVerifier::handleAccelTables() {

llvm/lib/IR/ConvergenceVerifier.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ auto GenericConvergenceVerifier<SSAContext>::getConvOp(const Instruction &I)
3434

3535
template <>
3636
void GenericConvergenceVerifier<SSAContext>::checkConvergenceTokenProduced(
37-
const Instruction &I) {
38-
return;
39-
}
37+
const Instruction &I) {}
4038

4139
template <>
4240
const Instruction *

llvm/lib/Support/Mustache.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,6 @@ void ASTNode::renderSectionLambdas(const json::Value &Contexts,
707707
Parser P = Parser(LambdaStr);
708708
AstPtr LambdaNode = P.parse(Partials, Lambdas, SectionLambdas, Escapes);
709709
LambdaNode->render(Contexts, OS);
710-
return;
711710
}
712711

713712
void Template::render(const json::Value &Data, llvm::raw_ostream &OS) {

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5902,7 +5902,6 @@ static void ReplaceTcgen05Ld(SDNode *N, SelectionDAG &DAG,
59025902
SDValue BuildVector = DAG.getNode(ISD::BUILD_VECTOR, DL, ResVT, ScalarRes);
59035903
Results.push_back(BuildVector); // Build Vector
59045904
Results.push_back(Chain); // Chain
5905-
return;
59065905
}
59075906

59085907
static void ReplaceINTRINSIC_W_CHAIN(SDNode *N, SelectionDAG &DAG,

llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,6 @@ static void lowerExpectAssume(IntrinsicInst *II) {
357357
} else {
358358
llvm_unreachable("Unknown intrinsic");
359359
}
360-
361-
return;
362360
}
363361

364362
static bool toSpvOverloadedIntrinsic(IntrinsicInst *II, Intrinsic::ID NewID,

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,6 @@ static void analyzeCostOfVecReduction(const IntrinsicInst &II,
12951295
}
12961296
CostAfterReduction = TTI.getArithmeticReductionCost(ReductionOpc, VecRedTy,
12971297
std::nullopt, CostKind);
1298-
return;
12991298
}
13001299

13011300
bool VectorCombine::foldBinopOfReductions(Instruction &I) {

0 commit comments

Comments
 (0)