Skip to content

Commit da9c13a

Browse files
committed
[upstream-update] SmallPtrSet can now only have at most 32 elements inline.
(cherry picked from commit 88250e0) (cherry picked from commit 4008ec8) (cherry picked from commit 3a031eb)
1 parent 00edc61 commit da9c13a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/SILOptimizer/IPO/DeadFunctionElimination.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class FunctionLivenessComputation {
5555

5656
llvm::SmallSetVector<SILFunction *, 16> Worklist;
5757

58-
llvm::SmallPtrSet<SILFunction *, 100> AliveFunctions;
58+
llvm::SmallPtrSet<SILFunction *, 32> AliveFunctions;
5959

6060
/// Checks is a function is alive, e.g. because it is visible externally.
6161
bool isAnchorFunction(SILFunction *F) {

lib/SILOptimizer/SILCombiner/SILCombine.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ STATISTIC(NumDeadInst, "Number of dead insts eliminated");
5151
/// worklist (this significantly speeds up SILCombine on code where many
5252
/// instructions are dead or constant).
5353
void SILCombiner::addReachableCodeToWorklist(SILBasicBlock *BB) {
54-
llvm::SmallVector<SILBasicBlock*, 256> Worklist;
55-
llvm::SmallVector<SILInstruction*, 128> InstrsForSILCombineWorklist;
56-
llvm::SmallPtrSet<SILBasicBlock*, 64> Visited;
54+
llvm::SmallVector<SILBasicBlock *, 256> Worklist;
55+
llvm::SmallVector<SILInstruction *, 128> InstrsForSILCombineWorklist;
56+
llvm::SmallPtrSet<SILBasicBlock *, 32> Visited;
5757

5858
Worklist.push_back(BB);
5959
do {

0 commit comments

Comments
 (0)