Skip to content

Spelling sil #42471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 87 commits into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
d7d7283
spelling: accessible
jsoref Apr 17, 2022
52e5c69
spelling: accessories
jsoref Apr 18, 2022
43b6e82
spelling: allocated
jsoref Apr 17, 2022
3547013
spelling: amortizes
jsoref Apr 17, 2022
b3765ca
spelling: are
jsoref Apr 17, 2022
4c6ce2a
spelling: arguments
jsoref Apr 17, 2022
956605e
spelling: cacheable
jsoref Apr 17, 2022
4ab2f69
spelling: check
jsoref Apr 17, 2022
9f07ecc
spelling: clazz
jsoref Apr 17, 2022
f141eff
spelling: compatible
jsoref Apr 17, 2022
02fa2b0
spelling: compilation
jsoref Apr 17, 2022
616b0f9
spelling: completely
jsoref Apr 17, 2022
33dafb2
spelling: construct
jsoref Apr 17, 2022
80ae9e6
spelling: conversion
jsoref Apr 17, 2022
9ccd80c
spelling: declarations
jsoref Apr 17, 2022
08207f3
spelling: derivation
jsoref Apr 17, 2022
708f551
spelling: deserialization
jsoref Apr 17, 2022
3213524
spelling: destroyed
jsoref Apr 17, 2022
727e3aa
spelling: determined
jsoref Apr 17, 2022
17c4ce1
spelling: different
jsoref Apr 17, 2022
b5d7933
spelling: doesn't
jsoref Apr 17, 2022
483ca6c
spelling: equality
jsoref Apr 17, 2022
f499d35
spelling: equivalent
jsoref Apr 17, 2022
f39e31b
spelling: formation
jsoref Apr 17, 2022
5733bff
spelling: forwards
jsoref Apr 17, 2022
42fc5d8
spelling: global
jsoref Apr 17, 2022
b034225
spelling: guaranteed
jsoref Apr 17, 2022
42a214b
spelling: have
jsoref Apr 17, 2022
19a4952
spelling: identify
jsoref Apr 17, 2022
cb8499f
spelling: inaccessible
jsoref Apr 17, 2022
32a84ad
spelling: indeterminate
jsoref Apr 17, 2022
02f641c
spelling: indices
jsoref Apr 17, 2022
46918ed
spelling: inefficient
jsoref Apr 17, 2022
54aabd6
spelling: inheritance
jsoref Apr 17, 2022
5bfd0c0
spelling: instantaneous
jsoref Apr 17, 2022
284fa1f
spelling: instruction
jsoref Apr 17, 2022
22a6d53
spelling: intentionally
jsoref Apr 17, 2022
ce089de
spelling: interior
jsoref Apr 17, 2022
23779e4
spelling: intrinsic
jsoref Apr 17, 2022
66e8086
spelling: introducing
jsoref Apr 17, 2022
2d3a351
spelling: irrelevant
jsoref Apr 17, 2022
86e319e
spelling: message
jsoref Apr 17, 2022
cd669e6
spelling: multi
jsoref Apr 17, 2022
e86a4a6
spelling: necessarily
jsoref Apr 17, 2022
21af5cb
spelling: object
jsoref Apr 17, 2022
6993b97
spelling: one
jsoref Apr 18, 2022
29a82ff
spelling: optimization
jsoref Apr 17, 2022
60bf269
spelling: otherwise
jsoref Apr 17, 2022
1b4c5d4
spelling: overridden
jsoref Apr 17, 2022
170dd8a
spelling: parameter
jsoref Apr 17, 2022
f67eef0
spelling: pattern
jsoref Apr 17, 2022
e36df8d
spelling: pipeline
jsoref Apr 17, 2022
d0d67d7
spelling: possibility
jsoref Apr 17, 2022
07ff4e3
spelling: postdominance
jsoref Apr 17, 2022
ab473ff
spelling: providing
jsoref Apr 17, 2022
5829eb6
spelling: reached
jsoref Apr 17, 2022
8089c7a
spelling: recognized
jsoref Apr 17, 2022
8602507
spelling: refrigerator
jsoref Apr 17, 2022
2049db1
spelling: remaining
jsoref Apr 17, 2022
bd66d9c
spelling: resilient
jsoref Apr 17, 2022
ec3b48d
spelling: retrieve
jsoref Apr 17, 2022
50085bd
spelling: scavenge
jsoref Apr 17, 2022
4b6106e
spelling: scheduled
jsoref Apr 17, 2022
50294eb
spelling: separately
jsoref Apr 17, 2022
c5d8407
spelling: serializable
jsoref Apr 17, 2022
aae5752
spelling: signature
jsoref Apr 17, 2022
32cfbe0
spelling: simplicity
jsoref Apr 17, 2022
bef2970
spelling: specifically
jsoref Apr 17, 2022
df9c609
spelling: substituted
jsoref Apr 17, 2022
2d18c48
spelling: substitution
jsoref Apr 17, 2022
96cd973
spelling: subtypes
jsoref Apr 17, 2022
41e235a
spelling: supplement
jsoref Apr 17, 2022
b435e8a
spelling: syntax
jsoref Apr 17, 2022
f20f051
spelling: the
jsoref Apr 17, 2022
5a09230
spelling: there
jsoref Apr 17, 2022
92dd4e9
spelling: these
jsoref Apr 17, 2022
bcfbc49
spelling: this
jsoref Apr 17, 2022
e6f1e76
spelling: though
jsoref Apr 17, 2022
c9abda4
spelling: through
jsoref Apr 17, 2022
4054dc4
spelling: transitively
jsoref Apr 17, 2022
f30c830
spelling: transpose
jsoref Apr 17, 2022
560e9c9
spelling: trivial
jsoref Apr 17, 2022
230af59
spelling: value
jsoref Apr 17, 2022
1838ae5
spelling: verification
jsoref Apr 17, 2022
a7d6bb1
spelling: visibility
jsoref Apr 17, 2022
94390c7
spelling: weird
jsoref Apr 17, 2022
6580430
spelling: whole
jsoref Apr 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions SwiftCompilerSources/Sources/SIL/Effects.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ public struct ArgumentEffect : CustomStringConvertible, CustomReflectable {
public enum Kind {
/// The selected argument value does not escape.
///
/// Synatx examples:
/// Syntax examples:
/// !%0 // argument 0 does not escape
/// !%0.** // argument 0 and all transitively contained values do not escape
///
case notEscaping

/// The selected argument value escapes to the specified selection (= first payload).
///
/// Synatx examples:
/// Syntax examples:
/// %0.s1 => %r // field 2 of argument 0 exclusively escapes via return.
/// %0.s1 -> %1 // field 2 of argument 0 - and other values - escape to argument 1.
///
Expand Down Expand Up @@ -262,7 +262,7 @@ extension StringParser {
}
if function.numIndirectResultArguments > 0 {
if function.numIndirectResultArguments != 1 {
try throwError("mutli-value returns not supported yet")
try throwError("multi-value returns not supported yet")
}
value = .argument(0)
} else {
Expand All @@ -274,7 +274,7 @@ extension StringParser {
}
value = .argument(argIdx + function.numIndirectResultArguments)
} else {
try throwError("paramter name or return expected")
try throwError("parameter name or return expected")
}

let valueType: Type
Expand Down
2 changes: 1 addition & 1 deletion SwiftCompilerSources/Sources/SIL/SubstitutionMap.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===--- PassUtils.swift - Utilities for optimzation passes ---------------===//
//===--- PassUtils.swift - Utilities for optimization passes ---------------===//
//
// This source file is part of the Swift.org open source project
//
Expand Down
6 changes: 3 additions & 3 deletions include/swift/SIL/AbstractionPattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ class AbstractionPattern {
/// imported as a method.
///
/// For example, if the original function is:
/// void CCRefrigatorSetTemperature(CCRefrigeratorRef fridge,
/// void CCRefrigeratorSetTemperature(CCRefrigeratorRef fridge,
/// CCRefrigeratorCompartment compartment,
/// CCTemperature temperature);
/// then the uncurried type is:
Expand All @@ -699,7 +699,7 @@ class AbstractionPattern {
/// C function imported as a method.
///
/// For example, if the original function is:
/// void CCRefrigatorSetTemperature(CCRefrigeratorRef fridge,
/// void CCRefrigeratorSetTemperature(CCRefrigeratorRef fridge,
/// CCRefrigeratorCompartment compartment,
/// CCTemperature temperature);
/// then the curried type is:
Expand Down Expand Up @@ -840,7 +840,7 @@ class AbstractionPattern {
/// type of a C function imported as a method.
///
/// For example, if the original function is:
/// CCRefrigatorSetTemperature(CCRefrigeratorRef, CCTemperature)
/// CCRefrigeratorSetTemperature(CCRefrigeratorRef, CCTemperature)
/// then the curried type is:
/// (CCRefrigerator) -> (CCTemperature) -> ()
/// and the partially-applied curried type is:
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/ApplySite.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class ApplySite {
case ApplySiteKind::PartialApplyInst:
// The arguments to partial_apply are a suffix of the partial_apply's
// callee. Note that getSubstCalleeConv is function type of the callee
// argument passed to this apply, not necessarilly the function type of
// argument passed to this apply, not necessarily the function type of
// the underlying callee function (i.e. it is based on the `getCallee`
// type, not the `getCalleeOrigin` type).
//
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/BasicBlockDatastructures.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace swift {
/// Unfortunately it's not possible to use `llvm::SetVector` directly because
/// the BasicBlockSet and StackList constructors needs a `SILFunction` argument.
///
/// Note: This class does not provide a `remove` method intentinally, because
/// Note: This class does not provide a `remove` method intentionally, because
/// it would have a O(n) complexity.
class BasicBlockSetVector {
StackList<SILBasicBlock *> vector;
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/BasicBlockUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class DeadEndBlocks {
/// loop-nest relative to \p dominatingBlock causing us to go around a
/// backedge and hit the block during our traversal. In this case, we
/// have already during the traversal passed the exiting blocks of the
/// sub-loop as joint postdominace completion set blocks. This is useful
/// sub-loop as joint postdominance completion set blocks. This is useful
/// if one is using this API for lifetime extension purposes of lifetime
/// ending uses and one needs to insert compensating copy_value at these
/// locations due to the lack of strong control-equivalence in between
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/DynamicCasts.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ DynamicCastFeasibility classifyDynamicCast(
ModuleDecl *context,
CanType sourceType, CanType targetType,
bool isSourceTypeExact = false,
bool isWholdModuleOpts = false);
bool isWholeModuleOpts = false);

SILValue emitSuccessfulScalarUnconditionalCast(SILBuilder &B, SILLocation loc,
SILDynamicCastInst inst);
Expand Down
14 changes: 7 additions & 7 deletions include/swift/SIL/MemAccessUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ enum class AccessUseType { Exact, Inner, Overlapping };
/// The enum values are ordered. Each successive cast kind is more
/// transformative than the last.
///
/// TODO: Distinguish between LayoutEquivalent and LayoutCompatibile.
/// TODO: Distinguish between LayoutEquivalent and LayoutCompatible.
enum class AccessStorageCast { Identity, Type };

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

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

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

// Secondary entry point to check that cloning will succeed.
bool canCloneUseDefChain(SILValue addr) {
// Use any valid address as a placeholder. It is innaccessible.
// Use any valid address as a placeholder. It is inaccessible.
placeHolder = addr;
return cloneRecursive(addr);
}
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/MemoryLocations.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class MemoryLocations {
/// location 4 (Inner.b): [ 4]
/// \endcode
///
/// Bit 2 is never set because Inner is completly represented by its
/// Bit 2 is never set because Inner is completely represented by its
/// sub-locations 3 and 4. But bit 0 is set in location 0 (the "self" bit),
/// because it represents the untracked field ``Outer.z``.
///
Expand Down
18 changes: 9 additions & 9 deletions include/swift/SIL/OwnershipUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ inline bool isForwardingConsume(SILValue value) {
/// borrow scope and may be reborrowed.
///
/// In valid OSSA, this should never be called on values that introduce a new
/// scope (doing so would be extremely innefficient). The lifetime of a borrow
/// scope (doing so would be extremely inefficient). The lifetime of a borrow
/// introducing instruction is always determined by its direct EndBorrow uses
/// (see BorrowedValue::visitLocalScopeEndingUses). None of the non-scope-ending
/// uses are relevant, and there's no need to transively follow forwarding
/// uses are relevant, and there's no need to transitively follow forwarding
/// uses. However, this utility may be used on borrow-introducing values when
/// updating OSSA form to place EndBorrow uses after introducing new phis.
///
Expand Down Expand Up @@ -136,7 +136,7 @@ bool findExtendedUsesOfSimpleBorrowedValue(
/// valid BorrowedValue), then its uses are discovered transitively by looking
/// through forwarding operations. If any use is a PointerEscape, then this
/// returns false without adding more uses--the guaranteed value's lifetime is
/// indeterminite. If a use introduces a nested borrow scope, it creates use
/// indeterminate. If a use introduces a nested borrow scope, it creates use
/// points where the "extended" borrow scope ends. An extended borrow
/// scope is found by looking through any reborrows that end the nested
/// scope. Other uses within nested borrow scopes are ignored.
Expand Down Expand Up @@ -543,7 +543,7 @@ struct BorrowedValue {
/// called with a scope that is not local.
///
/// NOTE: To determine if a scope is a local scope, call
/// BorrowScopeIntoducingValue::isLocalScope().
/// BorrowScopeIntroducingValue::isLocalScope().
void getLocalScopeEndingInstructions(
SmallVectorImpl<SILInstruction *> &scopeEndingInsts) const;

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

bool isLocalScope() const { return kind.isLocalScope(); }
Expand Down Expand Up @@ -799,7 +799,7 @@ struct InteriorPointerOperand {
}

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

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

/// An owned value from the formataion of a new alloc_ref.
/// An owned value from the formation of a new alloc_ref.
AllocRefInit,
};

Expand Down
6 changes: 3 additions & 3 deletions include/swift/SIL/PrunedLiveness.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/// Dead, LiveWithin, LiveOut.
///
/// A LiveWithin block has a liveness boundary within the block. The client can
/// determine the boundary's intruction position by searching for the last use.
/// determine the boundary's instruction position by searching for the last use.
///
/// LiveOut indicates that liveness extends into a successor edges, therefore,
/// no uses within that block can be on the liveness boundary, unless that use
Expand Down Expand Up @@ -199,7 +199,7 @@ class PrunedLiveBlocks {
/// if they don't occur on the liveness boundary. Lifetime-ending uses that end
/// up on the final liveness boundary may be used to end the lifetime. It is up
/// to the client to determine which uses are potentially lifetime-ending. In
/// OSSA, the lifetime-ending property might be detemined by
/// OSSA, the lifetime-ending property might be determined by
/// OwnershipConstraint::isLifetimeEnding(). In non-OSSA, it might be determined
/// by deallocation. If a lifetime-ending use ends up within the liveness
/// boundary, then it is up to the client to figure out how to "extend" the
Expand Down Expand Up @@ -384,7 +384,7 @@ struct PrunedLivenessBoundary {
/// If the jointly post-dominating destroys do not include dead end paths,
/// then any uses on those paths will not be included in the boundary. The
/// resulting partial boundary will have holes along those paths. The dead end
/// successors of blocks in this live set on are not necessarilly identified
/// successors of blocks in this live set on are not necessarily identified
/// by DeadEndBlocks.
void compute(const PrunedLiveness &liveness,
ArrayRef<SILBasicBlock *> postDomBlocks);
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/RuntimeEffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ enum class RuntimeEffect : unsigned {

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

/// The runtime function calls ObjectiveC methods.
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/SILBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SILBuilderContext {

SILModule &Module;

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

Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/SILCloner.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class SILCloner : protected SILInstructionVisitor<ImplClass> {

SubstitutionMap getOpSubstitutionMap(SubstitutionMap Subs) {
// If we have open existentials to substitute, check whether that's
// relevant to this this particular substitution.
// relevant to this particular substitution.
if (!OpenedExistentialSubs.empty()) {
for (auto ty : Subs.getReplacementTypes()) {
// If we found a type containing an opened existential, substitute
Expand Down
4 changes: 2 additions & 2 deletions include/swift/SIL/SILConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class SymbolicValueAllocator {

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

// A substitution map that partially maps the generic paramters of the
// A substitution map that partially maps the generic parameters of the
// applied function to the generic arguments of passed to the call.
SubstitutionMap substitutionMap;

Expand Down
18 changes: 9 additions & 9 deletions include/swift/SIL/SILInstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ StringRef getSILInstructionName(SILInstructionKind Kind);
///
/// *NOTE* The reason why this does not store the size of the stored element is
/// that just from the number of elements we can infer the size of each element
/// due to the restricted problem space. Specificially:
/// due to the restricted problem space. Specifically:
///
/// 1. Size == 0 implies nothing is stored and thus element size is irrelevent.
/// 1. Size == 0 implies nothing is stored and thus element size is irrelevant.
/// 2. Size == 1 implies we either had a single value instruction or a multiple
/// value instruction, but no matter what instruction we had, we are going to
/// store the results at the same starting location so element size is
/// irrelevent.
/// irrelevant.
/// 3. Size > 1 implies we must be storing multiple value instruction results
/// implying that the size of each stored element must be
/// sizeof(MultipleValueInstructionResult).
Expand Down Expand Up @@ -854,7 +854,7 @@ class NonSingleValueInstruction : public SILInstruction, public SILNode {
};

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

Expand Down Expand Up @@ -5875,7 +5875,7 @@ class SetDeallocatingInst

/// ObjectInst - Represents a object value type.
///
/// This instruction can only appear at the end of a gobal variable's
/// This instruction can only appear at the end of a global variable's
/// static initializer list.
class ObjectInst final : public InstructionBaseWithTrailingOperands<
SILInstructionKind::ObjectInst, ObjectInst,
Expand Down Expand Up @@ -9309,7 +9309,7 @@ class DifferentiableFunctionInst final
}
};

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

while (true) {
// Intentionally don't lookup throught dynamic_function_ref and
// Intentionally don't lookup through dynamic_function_ref and
// previous_dynamic_function_ref as the target of those functions is not
// statically known.
if (auto *FRI = dyn_cast<FunctionRefInst>(Callee))
Expand Down
Loading