Skip to content

Commit d767912

Browse files
authored
Spelling sil (#42471)
* spelling: accessible Signed-off-by: Josh Soref <[email protected]> * spelling: accessories Signed-off-by: Josh Soref <[email protected]> * spelling: allocated Signed-off-by: Josh Soref <[email protected]> * spelling: amortizes Signed-off-by: Josh Soref <[email protected]> * spelling: are Signed-off-by: Josh Soref <[email protected]> * spelling: arguments Signed-off-by: Josh Soref <[email protected]> * spelling: cacheable Signed-off-by: Josh Soref <[email protected]> * spelling: check Signed-off-by: Josh Soref <[email protected]> * spelling: clazz Signed-off-by: Josh Soref <[email protected]> * spelling: compatible Signed-off-by: Josh Soref <[email protected]> * spelling: compilation Signed-off-by: Josh Soref <[email protected]> * spelling: completely Signed-off-by: Josh Soref <[email protected]> * spelling: construct Signed-off-by: Josh Soref <[email protected]> * spelling: conversion Signed-off-by: Josh Soref <[email protected]> * spelling: declarations Signed-off-by: Josh Soref <[email protected]> * spelling: derivation Signed-off-by: Josh Soref <[email protected]> * spelling: deserialization Signed-off-by: Josh Soref <[email protected]> * spelling: destroyed Signed-off-by: Josh Soref <[email protected]> * spelling: determined Signed-off-by: Josh Soref <[email protected]> * spelling: different Signed-off-by: Josh Soref <[email protected]> * spelling: doesn't Signed-off-by: Josh Soref <[email protected]> * spelling: equality Signed-off-by: Josh Soref <[email protected]> * spelling: equivalent Signed-off-by: Josh Soref <[email protected]> * spelling: formation Signed-off-by: Josh Soref <[email protected]> * spelling: forwards Signed-off-by: Josh Soref <[email protected]> * spelling: global Signed-off-by: Josh Soref <[email protected]> * spelling: guaranteed Signed-off-by: Josh Soref <[email protected]> * spelling: have Signed-off-by: Josh Soref <[email protected]> * spelling: identify Signed-off-by: Josh Soref <[email protected]> * spelling: inaccessible Signed-off-by: Josh Soref <[email protected]> * spelling: indeterminate Signed-off-by: Josh Soref <[email protected]> * spelling: indices Signed-off-by: Josh Soref <[email protected]> * spelling: inefficient Signed-off-by: Josh Soref <[email protected]> * spelling: inheritance Signed-off-by: Josh Soref <[email protected]> * spelling: instantaneous Signed-off-by: Josh Soref <[email protected]> * spelling: instruction Signed-off-by: Josh Soref <[email protected]> * spelling: intentionally Signed-off-by: Josh Soref <[email protected]> * spelling: interior Signed-off-by: Josh Soref <[email protected]> * spelling: intrinsic Signed-off-by: Josh Soref <[email protected]> * spelling: introducing Signed-off-by: Josh Soref <[email protected]> * spelling: irrelevant Signed-off-by: Josh Soref <[email protected]> * spelling: message Signed-off-by: Josh Soref <[email protected]> * spelling: multi Signed-off-by: Josh Soref <[email protected]> * spelling: necessarily Signed-off-by: Josh Soref <[email protected]> * spelling: object Signed-off-by: Josh Soref <[email protected]> * spelling: one Signed-off-by: Josh Soref <[email protected]> * spelling: optimization Signed-off-by: Josh Soref <[email protected]> * spelling: otherwise Signed-off-by: Josh Soref <[email protected]> * spelling: overridden Signed-off-by: Josh Soref <[email protected]> * spelling: parameter Signed-off-by: Josh Soref <[email protected]> * spelling: pattern Signed-off-by: Josh Soref <[email protected]> * spelling: pipeline Signed-off-by: Josh Soref <[email protected]> * spelling: possibility Signed-off-by: Josh Soref <[email protected]> * spelling: postdominance Signed-off-by: Josh Soref <[email protected]> * spelling: providing Signed-off-by: Josh Soref <[email protected]> * spelling: reached Signed-off-by: Josh Soref <[email protected]> * spelling: recognized Signed-off-by: Josh Soref <[email protected]> * spelling: refrigerator Signed-off-by: Josh Soref <[email protected]> * spelling: remaining Signed-off-by: Josh Soref <[email protected]> * spelling: resilient Signed-off-by: Josh Soref <[email protected]> * spelling: retrieve Signed-off-by: Josh Soref <[email protected]> * spelling: scavenge Signed-off-by: Josh Soref <[email protected]> * spelling: scheduled Signed-off-by: Josh Soref <[email protected]> * spelling: separately Signed-off-by: Josh Soref <[email protected]> * spelling: serializable Signed-off-by: Josh Soref <[email protected]> * spelling: signature Signed-off-by: Josh Soref <[email protected]> * spelling: simplicity Signed-off-by: Josh Soref <[email protected]> * spelling: specifically Signed-off-by: Josh Soref <[email protected]> * spelling: substituted Signed-off-by: Josh Soref <[email protected]> * spelling: substitution Signed-off-by: Josh Soref <[email protected]> * spelling: subtypes Signed-off-by: Josh Soref <[email protected]> * spelling: supplement Signed-off-by: Josh Soref <[email protected]> * spelling: syntax Signed-off-by: Josh Soref <[email protected]> * spelling: the Signed-off-by: Josh Soref <[email protected]> * spelling: there Signed-off-by: Josh Soref <[email protected]> * spelling: these Signed-off-by: Josh Soref <[email protected]> * spelling: this Signed-off-by: Josh Soref <[email protected]> * spelling: though Signed-off-by: Josh Soref <[email protected]> * spelling: through Signed-off-by: Josh Soref <[email protected]> * spelling: transitively Signed-off-by: Josh Soref <[email protected]> * spelling: transpose Signed-off-by: Josh Soref <[email protected]> * spelling: trivial Signed-off-by: Josh Soref <[email protected]> * spelling: value Signed-off-by: Josh Soref <[email protected]> * spelling: verification Signed-off-by: Josh Soref <[email protected]> * spelling: visibility Signed-off-by: Josh Soref <[email protected]> * spelling: weird Signed-off-by: Josh Soref <[email protected]> * spelling: whole Signed-off-by: Josh Soref <[email protected]> Co-authored-by: Josh Soref <[email protected]>
1 parent dfbf5b6 commit d767912

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+115
-115
lines changed

SwiftCompilerSources/Sources/SIL/Effects.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ public struct ArgumentEffect : CustomStringConvertible, CustomReflectable {
9393
public enum Kind {
9494
/// The selected argument value does not escape.
9595
///
96-
/// Synatx examples:
96+
/// Syntax examples:
9797
/// !%0 // argument 0 does not escape
9898
/// !%0.** // argument 0 and all transitively contained values do not escape
9999
///
100100
case notEscaping
101101

102102
/// The selected argument value escapes to the specified selection (= first payload).
103103
///
104-
/// Synatx examples:
104+
/// Syntax examples:
105105
/// %0.s1 => %r // field 2 of argument 0 exclusively escapes via return.
106106
/// %0.s1 -> %1 // field 2 of argument 0 - and other values - escape to argument 1.
107107
///
@@ -262,7 +262,7 @@ extension StringParser {
262262
}
263263
if function.numIndirectResultArguments > 0 {
264264
if function.numIndirectResultArguments != 1 {
265-
try throwError("mutli-value returns not supported yet")
265+
try throwError("multi-value returns not supported yet")
266266
}
267267
value = .argument(0)
268268
} else {
@@ -274,7 +274,7 @@ extension StringParser {
274274
}
275275
value = .argument(argIdx + function.numIndirectResultArguments)
276276
} else {
277-
try throwError("paramter name or return expected")
277+
try throwError("parameter name or return expected")
278278
}
279279

280280
let valueType: Type

SwiftCompilerSources/Sources/SIL/SubstitutionMap.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- PassUtils.swift - Utilities for optimzation passes ---------------===//
1+
//===--- PassUtils.swift - Utilities for optimization passes ---------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

include/swift/SIL/AbstractionPattern.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ class AbstractionPattern {
679679
/// imported as a method.
680680
///
681681
/// For example, if the original function is:
682-
/// void CCRefrigatorSetTemperature(CCRefrigeratorRef fridge,
682+
/// void CCRefrigeratorSetTemperature(CCRefrigeratorRef fridge,
683683
/// CCRefrigeratorCompartment compartment,
684684
/// CCTemperature temperature);
685685
/// then the uncurried type is:
@@ -699,7 +699,7 @@ class AbstractionPattern {
699699
/// C function imported as a method.
700700
///
701701
/// For example, if the original function is:
702-
/// void CCRefrigatorSetTemperature(CCRefrigeratorRef fridge,
702+
/// void CCRefrigeratorSetTemperature(CCRefrigeratorRef fridge,
703703
/// CCRefrigeratorCompartment compartment,
704704
/// CCTemperature temperature);
705705
/// then the curried type is:
@@ -840,7 +840,7 @@ class AbstractionPattern {
840840
/// type of a C function imported as a method.
841841
///
842842
/// For example, if the original function is:
843-
/// CCRefrigatorSetTemperature(CCRefrigeratorRef, CCTemperature)
843+
/// CCRefrigeratorSetTemperature(CCRefrigeratorRef, CCTemperature)
844844
/// then the curried type is:
845845
/// (CCRefrigerator) -> (CCTemperature) -> ()
846846
/// and the partially-applied curried type is:

include/swift/SIL/ApplySite.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ class ApplySite {
329329
case ApplySiteKind::PartialApplyInst:
330330
// The arguments to partial_apply are a suffix of the partial_apply's
331331
// callee. Note that getSubstCalleeConv is function type of the callee
332-
// argument passed to this apply, not necessarilly the function type of
332+
// argument passed to this apply, not necessarily the function type of
333333
// the underlying callee function (i.e. it is based on the `getCallee`
334334
// type, not the `getCalleeOrigin` type).
335335
//

include/swift/SIL/BasicBlockDatastructures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace swift {
2929
/// Unfortunately it's not possible to use `llvm::SetVector` directly because
3030
/// the BasicBlockSet and StackList constructors needs a `SILFunction` argument.
3131
///
32-
/// Note: This class does not provide a `remove` method intentinally, because
32+
/// Note: This class does not provide a `remove` method intentionally, because
3333
/// it would have a O(n) complexity.
3434
class BasicBlockSetVector {
3535
StackList<SILBasicBlock *> vector;

include/swift/SIL/BasicBlockUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class DeadEndBlocks {
127127
/// loop-nest relative to \p dominatingBlock causing us to go around a
128128
/// backedge and hit the block during our traversal. In this case, we
129129
/// have already during the traversal passed the exiting blocks of the
130-
/// sub-loop as joint postdominace completion set blocks. This is useful
130+
/// sub-loop as joint postdominance completion set blocks. This is useful
131131
/// if one is using this API for lifetime extension purposes of lifetime
132132
/// ending uses and one needs to insert compensating copy_value at these
133133
/// locations due to the lack of strong control-equivalence in between

include/swift/SIL/DynamicCasts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ DynamicCastFeasibility classifyDynamicCast(
6767
ModuleDecl *context,
6868
CanType sourceType, CanType targetType,
6969
bool isSourceTypeExact = false,
70-
bool isWholdModuleOpts = false);
70+
bool isWholeModuleOpts = false);
7171

7272
SILValue emitSuccessfulScalarUnconditionalCast(SILBuilder &B, SILLocation loc,
7373
SILDynamicCastInst inst);

include/swift/SIL/MemAccessUtils.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ enum class AccessUseType { Exact, Inner, Overlapping };
267267
/// The enum values are ordered. Each successive cast kind is more
268268
/// transformative than the last.
269269
///
270-
/// TODO: Distinguish between LayoutEquivalent and LayoutCompatibile.
270+
/// TODO: Distinguish between LayoutEquivalent and LayoutCompatible.
271271
enum class AccessStorageCast { Identity, Type };
272272

273273
/// The physical representation used to identify access information and common
@@ -367,7 +367,7 @@ class AccessRepresentation {
367367
// Define bits for use in the AccessEnforcementOpts pass. Each begin_access
368368
// in the function is mapped to one instance of this subclass. Reserve a
369369
// bit for a seenNestedConflict flag, which is the per-begin-access result
370-
// of pass-specific analysis. The remaning bits are sufficient to index all
370+
// of pass-specific analysis. The remaining bits are sufficient to index all
371371
// begin_[unpaired_]access instructions.
372372
//
373373
// `AccessRepresentation` refers to the AccessRepresentationBitfield defined
@@ -559,15 +559,15 @@ class AccessRepresentation {
559559
private:
560560
// Disable direct comparison because we allow subclassing with bitfields.
561561
// Currently, we use DenseMapInfo to unique storage, which defines key
562-
// equalilty only in terms of the base AccessStorage class bits.
562+
// equality only in terms of the base AccessStorage class bits.
563563
bool operator==(const AccessRepresentation &) const = delete;
564564
bool operator!=(const AccessRepresentation &) const = delete;
565565
};
566566

567567
/// The base of a formal access.
568568
///
569569
/// Note that the SILValue that represents a storage object is not
570-
/// necessarilly an address type. It may instead be a SILBoxType. So, even
570+
/// necessarily an address type. It may instead be a SILBoxType. So, even
571571
/// though address phis are not allowed, finding the base of an access may
572572
/// require traversing phis.
573573
class AccessBase : public AccessRepresentation {
@@ -991,7 +991,7 @@ namespace swift {
991991
/// this, we instead consider it an invalid AccessPath. This is the only case in
992992
/// which AccessPath::storage can differ from AccessStorage::compute().
993993
///
994-
/// Storing an AccessPath ammortizes to constant space. To cache identification
994+
/// Storing an AccessPath amortizes to constant space. To cache identification
995995
/// of address locations, AccessPath should be used rather than the
996996
/// ProjectionPath which requires quadratic space in the number of address
997997
/// values and quadratic time when comparing addresses.
@@ -1199,7 +1199,7 @@ class AccessPath {
11991199

12001200
// Encapsulate the result of computing an AccessPath. AccessPath does not store
12011201
// the base address of the formal access because it does not always uniquely
1202-
// indentify the access, but AccessPath users may use the base address to to
1202+
// identify the access, but AccessPath users may use the base address to to
12031203
// recover the def-use chain for a specific global_addr or ref_element_addr.
12041204
struct AccessPathWithBase {
12051205
AccessPath accessPath;
@@ -1819,7 +1819,7 @@ class AccessUseDefChainCloner
18191819

18201820
// Secondary entry point to check that cloning will succeed.
18211821
bool canCloneUseDefChain(SILValue addr) {
1822-
// Use any valid address as a placeholder. It is innaccessible.
1822+
// Use any valid address as a placeholder. It is inaccessible.
18231823
placeHolder = addr;
18241824
return cloneRecursive(addr);
18251825
}

include/swift/SIL/MemoryLocations.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class MemoryLocations {
113113
/// location 4 (Inner.b): [ 4]
114114
/// \endcode
115115
///
116-
/// Bit 2 is never set because Inner is completly represented by its
116+
/// Bit 2 is never set because Inner is completely represented by its
117117
/// sub-locations 3 and 4. But bit 0 is set in location 0 (the "self" bit),
118118
/// because it represents the untracked field ``Outer.z``.
119119
///

include/swift/SIL/OwnershipUtils.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ inline bool isForwardingConsume(SILValue value) {
9090
/// borrow scope and may be reborrowed.
9191
///
9292
/// In valid OSSA, this should never be called on values that introduce a new
93-
/// scope (doing so would be extremely innefficient). The lifetime of a borrow
93+
/// scope (doing so would be extremely inefficient). The lifetime of a borrow
9494
/// introducing instruction is always determined by its direct EndBorrow uses
9595
/// (see BorrowedValue::visitLocalScopeEndingUses). None of the non-scope-ending
96-
/// uses are relevant, and there's no need to transively follow forwarding
96+
/// uses are relevant, and there's no need to transitively follow forwarding
9797
/// uses. However, this utility may be used on borrow-introducing values when
9898
/// updating OSSA form to place EndBorrow uses after introducing new phis.
9999
///
@@ -136,7 +136,7 @@ bool findExtendedUsesOfSimpleBorrowedValue(
136136
/// valid BorrowedValue), then its uses are discovered transitively by looking
137137
/// through forwarding operations. If any use is a PointerEscape, then this
138138
/// returns false without adding more uses--the guaranteed value's lifetime is
139-
/// indeterminite. If a use introduces a nested borrow scope, it creates use
139+
/// indeterminate. If a use introduces a nested borrow scope, it creates use
140140
/// points where the "extended" borrow scope ends. An extended borrow
141141
/// scope is found by looking through any reborrows that end the nested
142142
/// scope. Other uses within nested borrow scopes are ignored.
@@ -543,7 +543,7 @@ struct BorrowedValue {
543543
/// called with a scope that is not local.
544544
///
545545
/// NOTE: To determine if a scope is a local scope, call
546-
/// BorrowScopeIntoducingValue::isLocalScope().
546+
/// BorrowScopeIntroducingValue::isLocalScope().
547547
void getLocalScopeEndingInstructions(
548548
SmallVectorImpl<SILInstruction *> &scopeEndingInsts) const;
549549

@@ -559,7 +559,7 @@ struct BorrowedValue {
559559
/// instructions before storing them.
560560
///
561561
/// NOTE: To determine if a scope is a local scope, call
562-
/// BorrowScopeIntoducingValue::isLocalScope().
562+
/// BorrowScopeIntroducingValue::isLocalScope().
563563
bool visitLocalScopeEndingUses(function_ref<bool(Operand *)> visitor) const;
564564

565565
bool isLocalScope() const { return kind.isLocalScope(); }
@@ -799,7 +799,7 @@ struct InteriorPointerOperand {
799799
}
800800

801801
/// If \p val is a result of an instruction that is an interior pointer,
802-
/// return an interor pointer operand based off of the base value operand of
802+
/// return an interior pointer operand based off of the base value operand of
803803
/// the instruction.
804804
static InteriorPointerOperand inferFromResult(SILValue resultValue) {
805805
auto kind = InteriorPointerOperandKind::inferFromResult(resultValue);
@@ -865,7 +865,7 @@ struct InteriorPointerOperand {
865865
}
866866

867867
/// Transitively compute the list of leaf uses that this interior pointer
868-
/// operand puts on its parent guaranted value.
868+
/// operand puts on its parent guaranteed value.
869869
///
870870
/// If \p foundUses is nullptr, this simply returns true if no PointerEscapes
871871
/// were found.
@@ -901,7 +901,7 @@ struct InteriorPointerOperand {
901901
/// scope and interiorPointerOp is irrelevant.
902902
///
903903
/// If hasOwnership() is true, then interiorPointerOp refers to the operand that
904-
/// converts a non-address value into the address from which the contructor's
904+
/// converts a non-address value into the address from which the constructor's
905905
/// address is derived. If the best-effort to find an InteriorPointerOperand
906906
/// fails, then interiorPointerOp remains invalid, and clients must be
907907
/// conservative.
@@ -1011,7 +1011,7 @@ class OwnedValueIntroducerKind {
10111011
/// An owned value from the formation of a new alloc_box.
10121012
AllocBoxInit,
10131013

1014-
/// An owned value from the formataion of a new alloc_ref.
1014+
/// An owned value from the formation of a new alloc_ref.
10151015
AllocRefInit,
10161016
};
10171017

0 commit comments

Comments
 (0)