Skip to content

Commit 5adc471

Browse files
committed
[semantic-arc-opts] Shrink size of arrays in LiveRange.
I looked when building the stdlib/overlays and the vast majority of uses were < 2 for all of these values, so it makes sense to shrink them. Part of the reason I am doing this is that I think the pass is starting to coalesce a little bit and also I want to start optimizing owned phi arguments so I am going to need to start storing these. I don't want to be storing such large small arrays in any data structure anywhere.
1 parent 21a2cdb commit 5adc471

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SILOptimizer/Transforms/SemanticARCOpts.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ namespace {
4646

4747
class LiveRange {
4848
/// A list of destroy_values of the live range.
49-
SmallVector<SILInstruction *, 16> destroys;
49+
SmallVector<SILInstruction *, 2> destroys;
5050

5151
/// A list of forwarding instructions that forward our destroys ownership, but
5252
/// that are also able to forward guaranteed ownership.
53-
SmallVector<SILInstruction *, 16> generalForwardingInsts;
53+
SmallVector<SILInstruction *, 2> generalForwardingInsts;
5454

5555
/// Consuming users that we were not able to understand as a forwarding
5656
/// instruction or a destroy_value. These must be passed a strongly control
5757
/// equivalent +1 value.
58-
SmallVector<SILInstruction *, 16> unknownConsumingUsers;
58+
SmallVector<SILInstruction *, 2> unknownConsumingUsers;
5959

6060
public:
6161
LiveRange(SILValue value);

0 commit comments

Comments
 (0)