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

include/swift/SIL/PrunedLiveness.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/// Dead, LiveWithin, LiveOut.
2727
///
2828
/// A LiveWithin block has a liveness boundary within the block. The client can
29-
/// determine the boundary's intruction position by searching for the last use.
29+
/// determine the boundary's instruction position by searching for the last use.
3030
///
3131
/// LiveOut indicates that liveness extends into a successor edges, therefore,
3232
/// no uses within that block can be on the liveness boundary, unless that use
@@ -199,7 +199,7 @@ class PrunedLiveBlocks {
199199
/// if they don't occur on the liveness boundary. Lifetime-ending uses that end
200200
/// up on the final liveness boundary may be used to end the lifetime. It is up
201201
/// to the client to determine which uses are potentially lifetime-ending. In
202-
/// OSSA, the lifetime-ending property might be detemined by
202+
/// OSSA, the lifetime-ending property might be determined by
203203
/// OwnershipConstraint::isLifetimeEnding(). In non-OSSA, it might be determined
204204
/// by deallocation. If a lifetime-ending use ends up within the liveness
205205
/// boundary, then it is up to the client to figure out how to "extend" the
@@ -384,7 +384,7 @@ struct PrunedLivenessBoundary {
384384
/// If the jointly post-dominating destroys do not include dead end paths,
385385
/// then any uses on those paths will not be included in the boundary. The
386386
/// resulting partial boundary will have holes along those paths. The dead end
387-
/// successors of blocks in this live set on are not necessarilly identified
387+
/// successors of blocks in this live set on are not necessarily identified
388388
/// by DeadEndBlocks.
389389
void compute(const PrunedLiveness &liveness,
390390
ArrayRef<SILBasicBlock *> postDomBlocks);

include/swift/SIL/RuntimeEffect.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ enum class RuntimeEffect : unsigned {
4646

4747
/// The runtime function performs exclusivity checking.
4848
/// This does not have any observable runtime effect like locking or
49-
/// allocation, but it's modelled separatly.
49+
/// allocation, but it's modelled separately.
5050
ExclusivityChecking = 0x100,
5151

5252
/// The runtime function calls ObjectiveC methods.

include/swift/SIL/SILBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class SILBuilderContext {
4646

4747
SILModule &Module;
4848

49-
/// Allow the SIL module conventions to be overriden within the builder.
49+
/// Allow the SIL module conventions to be overridden within the builder.
5050
/// This supports passes that lower SIL to a new stage.
5151
SILModuleConventions silConv = SILModuleConventions(Module);
5252

include/swift/SIL/SILCloner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class SILCloner : protected SILInstructionVisitor<ImplClass> {
189189

190190
SubstitutionMap getOpSubstitutionMap(SubstitutionMap Subs) {
191191
// If we have open existentials to substitute, check whether that's
192-
// relevant to this this particular substitution.
192+
// relevant to this particular substitution.
193193
if (!OpenedExistentialSubs.empty()) {
194194
for (auto ty : Subs.getReplacementTypes()) {
195195
// If we found a type containing an opened existential, substitute

include/swift/SIL/SILConstants.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class SymbolicValueAllocator {
5353

5454
/// Allocate storage for a given number of elements of a specific type
5555
/// provided as a template parameter. Precondition: \c T must have an
56-
/// accesible zero argument constructor.
56+
/// accessible zero argument constructor.
5757
/// \param numElts number of elements of the type to allocate.
5858
template <typename T> T *allocate(unsigned numElts) {
5959
T *res = (T *)allocate(sizeof(T) * numElts, alignof(T));
@@ -695,7 +695,7 @@ struct SymbolicClosure final
695695
// known.
696696
bool hasNonConstantCaptures = true;
697697

698-
// A substitution map that partially maps the generic paramters of the
698+
// A substitution map that partially maps the generic parameters of the
699699
// applied function to the generic arguments of passed to the call.
700700
SubstitutionMap substitutionMap;
701701

include/swift/SIL/SILInstruction.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ StringRef getSILInstructionName(SILInstructionKind Kind);
119119
///
120120
/// *NOTE* The reason why this does not store the size of the stored element is
121121
/// that just from the number of elements we can infer the size of each element
122-
/// due to the restricted problem space. Specificially:
122+
/// due to the restricted problem space. Specifically:
123123
///
124-
/// 1. Size == 0 implies nothing is stored and thus element size is irrelevent.
124+
/// 1. Size == 0 implies nothing is stored and thus element size is irrelevant.
125125
/// 2. Size == 1 implies we either had a single value instruction or a multiple
126126
/// value instruction, but no matter what instruction we had, we are going to
127127
/// store the results at the same starting location so element size is
128-
/// irrelevent.
128+
/// irrelevant.
129129
/// 3. Size > 1 implies we must be storing multiple value instruction results
130130
/// implying that the size of each stored element must be
131131
/// sizeof(MultipleValueInstructionResult).
@@ -854,7 +854,7 @@ class NonSingleValueInstruction : public SILInstruction, public SILNode {
854854
};
855855

856856
inline SILNode *SILInstruction::asSILNode() {
857-
// Even if this insttruction is not a NonSingleValueInstruction, but a
857+
// Even if this instruction is not a NonSingleValueInstruction, but a
858858
// SingleValueInstruction, the SILNode is at the same offset as in a
859859
// NonSingleValueInstruction. See the top-level comment of SILInstruction.
860860
SILNode *node = (NonSingleValueInstruction *)this;
@@ -1374,7 +1374,7 @@ class MultipleValueInstructionResult : public ValueBase {
13741374
/// end of the specific subclass object.
13751375
///
13761376
/// *NOTE* subclassDeltaOffset must be use only 5 bits. This gives us to
1377-
/// support subclasses up to 32 bytes in size. We can scavange up to 6 more
1377+
/// support subclasses up to 32 bytes in size. We can scavenge up to 6 more
13781378
/// bits from ValueBase if this is not large enough.
13791379
MultipleValueInstructionResult(unsigned index, SILType type,
13801380
ValueOwnershipKind ownershipKind);
@@ -2277,7 +2277,7 @@ class AllocRefDynamicInst final
22772277
return getAllOperands().slice(getNumTailTypes() + 1);
22782278
}
22792279
// Is the deinit and the size of the dynamic type known to be equivalent to
2280-
// the the base type (i.e `this->getType()`).
2280+
// the base type (i.e `this->getType()`).
22812281
bool isDynamicTypeDeinitAndSizeKnownEquivalentToBaseType() const;
22822282
};
22832283

@@ -5875,7 +5875,7 @@ class SetDeallocatingInst
58755875

58765876
/// ObjectInst - Represents a object value type.
58775877
///
5878-
/// This instruction can only appear at the end of a gobal variable's
5878+
/// This instruction can only appear at the end of a global variable's
58795879
/// static initializer list.
58805880
class ObjectInst final : public InstructionBaseWithTrailingOperands<
58815881
SILInstructionKind::ObjectInst, ObjectInst,
@@ -9309,7 +9309,7 @@ class DifferentiableFunctionInst final
93099309
}
93109310
};
93119311

9312-
/// LinearFunctionInst - given a function, its derivative and traspose functions,
9312+
/// LinearFunctionInst - given a function, its derivative and transpose functions,
93139313
/// create an `@differentiable(_linear)` function that represents a bundle of these.
93149314
class LinearFunctionInst final
93159315
: public InstructionBaseWithTrailingOperands<
@@ -9512,7 +9512,7 @@ SILFunction *ApplyInstBase<Impl, Base, false>::getCalleeFunction() const {
95129512
SILValue Callee = getCalleeOrigin();
95139513

95149514
while (true) {
9515-
// Intentionally don't lookup throught dynamic_function_ref and
9515+
// Intentionally don't lookup through dynamic_function_ref and
95169516
// previous_dynamic_function_ref as the target of those functions is not
95179517
// statically known.
95189518
if (auto *FRI = dyn_cast<FunctionRefInst>(Callee))

0 commit comments

Comments
 (0)