Skip to content

Commit 53c065a

Browse files
authored
Merge pull request #16266 from gottesmm/pr-862698ff9224afe2ccafc3fa43c3016dd857c75d
[perf] Change a pass by value of a SmallPtrSet<Ptr, 8> to by ref.
2 parents 54137ed + 8a7e0fb commit 53c065a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SILOptimizer/Transforms/SimplifyCFG.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static SILValue getTerminatorCondition(TermInst *Term) {
266266

267267
/// Is this basic block jump threadable.
268268
static bool isThreadableBlock(SILBasicBlock *BB,
269-
SmallPtrSet<SILBasicBlock *, 32> &LoopHeaders) {
269+
SmallPtrSetImpl<SILBasicBlock *> &LoopHeaders) {
270270
if (isa<ReturnInst>(BB->getTerminator()))
271271
return false;
272272

@@ -444,7 +444,7 @@ static SILValue createValueForEdge(SILInstruction *UserInst,
444444
/// of the operand of 'DominatingBB's terminator.
445445
static bool tryDominatorBasedSimplifications(
446446
SILBasicBlock *DominatingBB, DominanceInfo *DT,
447-
SmallPtrSet<SILBasicBlock *, 32> &LoopHeaders,
447+
SmallPtrSetImpl<SILBasicBlock *> &LoopHeaders,
448448
SmallVectorImpl<ThreadInfo> &JumpThreadableEdges,
449449
llvm::DenseSet<std::pair<SILBasicBlock *, SILBasicBlock *>>
450450
&ThreadedEdgeSet,
@@ -767,7 +767,7 @@ bool SimplifyCFG::simplifyAfterDroppingPredecessor(SILBasicBlock *BB) {
767767

768768
static NullablePtr<EnumElementDecl>
769769
getEnumCaseRecursive(SILValue Val, SILBasicBlock *UsedInBB, int RecursionDepth,
770-
llvm::SmallPtrSet<SILArgument *, 8> HandledArgs) {
770+
llvm::SmallPtrSetImpl<SILArgument *> &HandledArgs) {
771771
// Limit the number of recursions. This is an easy way to cope with cycles
772772
// in the SSA graph.
773773
if (RecursionDepth > 3)

0 commit comments

Comments
 (0)