Skip to content

Commit 9c738f6

Browse files
Merge pull request #6438 from practicalswift/i-heard-you-like-partitions
[gardening] Fix partiion^H^H^H^H^Hitions^H^H^H^H^H^Htitions.
2 parents 323495f + fe3b996 commit 9c738f6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/IRGen/AllocStackHoisting.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class Partition {
7979
Partition() {}
8080

8181
/// Assign a single alloc_stack instruction to all the alloc_stacks in the
82-
/// partiion.
82+
/// partition.
8383
///
8484
/// This assumes that the live ranges of the alloc_stack instructions are
8585
/// non-overlapping.
@@ -111,7 +111,7 @@ insertDeallocStackAtEndOf(SmallVectorImpl<SILInstruction *> &FunctionExits,
111111
}
112112

113113
/// Assign a single alloc_stack instruction to all the alloc_stacks in the
114-
/// partiion.
114+
/// partition.
115115
void Partition::assignStackLocation(
116116
SmallVectorImpl<SILInstruction *> &FunctionExits) {
117117
assert(!Elts.empty() && "Must have a least one location");
@@ -262,14 +262,14 @@ void MergeStackSlots::mergeSlots() {
262262
for (auto &PartitionOfOneType : PartitionByType) {
263263
Liveness Live(PartitionOfOneType);
264264

265-
// Paritions that are know to contain non-overlapping alloc_stack
265+
// Partitions that are know to contain non-overlapping alloc_stack
266266
// live-ranges.
267267
SmallVector<Partition, 4> DisjointPartitions(1, Partition());
268268

269269
// Look at all the alloc_stacks of one type.
270270
for (auto *CurAllocStack : PartitionOfOneType.Elts) {
271271
bool FoundAPartition = false;
272-
// Check if we can add it to an existing parition that we have show to be
272+
// Check if we can add it to an existing partition that we have show to be
273273
// non-interfering.
274274
for (auto &CandidateP : DisjointPartitions) {
275275
// If the candidate partition is empty (the very first time we look at an
@@ -282,8 +282,8 @@ void MergeStackSlots::mergeSlots() {
282282
// Otherwise, we check interference of the current alloc_stack with the
283283
// candidate partition.
284284
bool InterferesWithCandidateP = false;
285-
for (auto *AllocStackInParition : CandidateP.Elts) {
286-
if (Live.mayOverlap(AllocStackInParition, CurAllocStack)) {
285+
for (auto *AllocStackInPartition : CandidateP.Elts) {
286+
if (Live.mayOverlap(AllocStackInPartition, CurAllocStack)) {
287287
InterferesWithCandidateP = true;
288288
break;
289289
}

0 commit comments

Comments
 (0)