From d7d72837f0490795d4df5a7a592f312e5f161a78 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:15:10 -0400 Subject: [PATCH 01/87] spelling: accessible Signed-off-by: Josh Soref --- include/swift/SIL/SILConstants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILConstants.h b/include/swift/SIL/SILConstants.h index 82b993db55130..5ed2a4e2eed43 100644 --- a/include/swift/SIL/SILConstants.h +++ b/include/swift/SIL/SILConstants.h @@ -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 T *allocate(unsigned numElts) { T *res = (T *)allocate(sizeof(T) * numElts, alignof(T)); From 52e5c6996e6d3a1faa11f8321bd54920c4679c04 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 21:07:03 -0400 Subject: [PATCH 02/87] spelling: accessories Signed-off-by: Josh Soref --- lib/SIL/IR/SILFunctionType.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/SILFunctionType.cpp b/lib/SIL/IR/SILFunctionType.cpp index e18ac80c3138a..14b432543a4db 100644 --- a/lib/SIL/IR/SILFunctionType.cpp +++ b/lib/SIL/IR/SILFunctionType.cpp @@ -2279,7 +2279,7 @@ struct DefaultAllocatorConventions : DefaultConventions { } }; -/// The default conventions for Swift setter acccessors. +/// The default conventions for Swift setter accessories. /// /// These take self at +0, but all other parameters at +1. This is because we /// assume that setter parameters are likely to be values to be forwarded into From 43b6e8278b5a4549be28167c3bde31cc9152245f Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:16:02 -0400 Subject: [PATCH 03/87] spelling: allocated Signed-off-by: Josh Soref --- lib/SIL/IR/SILModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/SILModule.cpp b/lib/SIL/IR/SILModule.cpp index 7f4d95f57d099..6ddd517753b02 100644 --- a/lib/SIL/IR/SILModule.cpp +++ b/lib/SIL/IR/SILModule.cpp @@ -178,7 +178,7 @@ void SILModule::checkForLeaks() const { if (numAllocated != instsInModule) { llvm::errs() << "Leaking instructions!\n"; - llvm::errs() << "Alloated instructions: " << numAllocated << '\n'; + llvm::errs() << "Allocated instructions: " << numAllocated << '\n'; llvm::errs() << "Instructions in module: " << instsInModule << '\n'; llvm_unreachable("leaking instructions"); } From 35470133147491c43f5674ef1f646310231301a7 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:16:13 -0400 Subject: [PATCH 04/87] spelling: amortizes Signed-off-by: Josh Soref --- include/swift/SIL/MemAccessUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/MemAccessUtils.h b/include/swift/SIL/MemAccessUtils.h index 0ed0d7f8f93dd..4ddf6ac1dc57c 100644 --- a/include/swift/SIL/MemAccessUtils.h +++ b/include/swift/SIL/MemAccessUtils.h @@ -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. From b3765ca545d9ee878bfe81b23108f8acfb3bd37c Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 17:43:25 -0400 Subject: [PATCH 05/87] spelling: are Signed-off-by: Josh Soref --- lib/SIL/Utils/MemAccessUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Utils/MemAccessUtils.cpp b/lib/SIL/Utils/MemAccessUtils.cpp index 55ce1a126cb4b..854738b5ce55b 100644 --- a/lib/SIL/Utils/MemAccessUtils.cpp +++ b/lib/SIL/Utils/MemAccessUtils.cpp @@ -1249,7 +1249,7 @@ class AccessPathVisitor : public FindAccessVisitorImpl { pathLength(pathLength) {} }; - // Only access projections affect this path. Since they are are not allowed + // Only access projections affect this path. Since they are not allowed // beyond phis, this path is not part of AccessPathVisitor::Result. llvm::SmallVector reversePath; // Holds a non-zero value if an index_addr has been processed without yet From 4c6ce2aa2f9c828f032e5ee622af840286343d32 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:16:52 -0400 Subject: [PATCH 06/87] spelling: arguments Signed-off-by: Josh Soref --- lib/SIL/IR/SILFunctionBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/SILFunctionBuilder.cpp b/lib/SIL/IR/SILFunctionBuilder.cpp index b53ccec81e574..ae2b98a41f5c9 100644 --- a/lib/SIL/IR/SILFunctionBuilder.cpp +++ b/lib/SIL/IR/SILFunctionBuilder.cpp @@ -125,7 +125,7 @@ void SILFunctionBuilder::addFunctionAttributes( if (ParameterList *paramList = fnDecl->getParameters()) { for (ParamDecl *pd : *paramList) { // Give up on tuples. Their elements are added as individual - // argumenst. It destroys the 1-1 relation ship between parameters + // arguments. It destroys the 1-1 relation ship between parameters // and arguments. if (isa(CanType(pd->getType()))) break; From 956605e01012535e47ea19cb0e48079e98eb262d Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:18:57 -0400 Subject: [PATCH 07/87] spelling: cacheable Signed-off-by: Josh Soref --- lib/SIL/IR/TypeLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/TypeLowering.cpp b/lib/SIL/IR/TypeLowering.cpp index 52b0faf8f72d0..4c8c8d88a0ed4 100644 --- a/lib/SIL/IR/TypeLowering.cpp +++ b/lib/SIL/IR/TypeLowering.cpp @@ -2115,7 +2115,7 @@ TypeConverter::getTypeLowering(AbstractionPattern origType, auto loweredSubstType = computeLoweredRValueType(forExpansion, origType, substType); - // If that didn't change the type and the key is cachable, there's no + // If that didn't change the type and the key is cacheable, there's no // point in re-checking the table, so just construct a type lowering // and cache it. if (loweredSubstType == substType && key.isCacheable()) { From 4ab2f693fcc06b39177e6aeca751508df7b178da Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:19:33 -0400 Subject: [PATCH 08/87] spelling: check Signed-off-by: Josh Soref --- test/SIL/Parser/witness_tables.sil | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/SIL/Parser/witness_tables.sil b/test/SIL/Parser/witness_tables.sil index e7d459700b29c..a4f4b46f68e10 100644 --- a/test/SIL/Parser/witness_tables.sil +++ b/test/SIL/Parser/witness_tables.sil @@ -108,7 +108,7 @@ extension ConditionalStruct : P where T : P { // CHECK-LABEL: sil_witness_table hidden ConditionalStruct: P module witness_tables { // CHECK-NEXT: conditional_conformance (T: P): dependent -// CHECL-NEXT: } +// CHECK-NEXT: } sil_witness_table hidden ConditionalStruct: P module t4 { conditional_conformance (T: P): dependent } From 9f07ecc39b268e8f29b56024b87baa47be71036c Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 16:31:59 -0400 Subject: [PATCH 09/87] spelling: clazz Signed-off-by: Josh Soref --- lib/SIL/Verifier/SILVerifier.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SIL/Verifier/SILVerifier.cpp b/lib/SIL/Verifier/SILVerifier.cpp index 5ce8eaccfc84d..af822d7c85b07 100644 --- a/lib/SIL/Verifier/SILVerifier.cpp +++ b/lib/SIL/Verifier/SILVerifier.cpp @@ -1949,9 +1949,9 @@ class SILVerifier : public SILVerifierBase { return true; if (t.getASTType() == t.getASTContext().TheNativeObjectType) return true; - if (auto clas = t.getClassOrBoundGenericClass()) + if (auto clazz = t.getClassOrBoundGenericClass()) // Must be a class defined in Swift. - return clas->hasKnownSwiftImplementation(); + return clazz->hasKnownSwiftImplementation(); return false; }; From f141eff471c7bb77cf13f7ac26511ca35e0be3e1 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:20:35 -0400 Subject: [PATCH 10/87] spelling: compatible Signed-off-by: Josh Soref --- include/swift/SIL/MemAccessUtils.h | 2 +- include/swift/SIL/SILValue.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/swift/SIL/MemAccessUtils.h b/include/swift/SIL/MemAccessUtils.h index 4ddf6ac1dc57c..5635ab9786254 100644 --- a/include/swift/SIL/MemAccessUtils.h +++ b/include/swift/SIL/MemAccessUtils.h @@ -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 diff --git a/include/swift/SIL/SILValue.h b/include/swift/SIL/SILValue.h index 191a5dd17c700..33b5fdbc60b80 100644 --- a/include/swift/SIL/SILValue.h +++ b/include/swift/SIL/SILValue.h @@ -309,7 +309,7 @@ struct ValueOwnershipKind { OperandOwnership getForwardingOperandOwnership(bool allowUnowned) const; /// Returns true if \p Other can be merged successfully with this, implying - /// that the two ownership kinds are "compatibile". + /// that the two ownership kinds are "compatible". /// /// The reason why we do not compare directy is to allow for /// OwnershipKind::None to merge into other forms of ValueOwnershipKind. From 02fa2b053e630faea85e2c28bf5826662ff3c24b Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:20:37 -0400 Subject: [PATCH 11/87] spelling: compilation Signed-off-by: Josh Soref --- lib/SIL/Verifier/MemoryLifetimeVerifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp b/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp index 1cc16bdead2ad..35c13c4e179f9 100644 --- a/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp +++ b/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp @@ -23,7 +23,7 @@ using namespace swift; llvm::cl::opt DontAbortOnMemoryLifetimeErrors( "dont-abort-on-memory-lifetime-errors", - llvm::cl::desc("Don't abort compliation if the memory lifetime checker " + llvm::cl::desc("Don't abort compilation if the memory lifetime checker " "detects an error.")); namespace { From 616b0f92da0cbd1768ea3ff758721169d8823853 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:20:48 -0400 Subject: [PATCH 12/87] spelling: completely Signed-off-by: Josh Soref --- include/swift/SIL/MemoryLocations.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/MemoryLocations.h b/include/swift/SIL/MemoryLocations.h index 0d3c458b7c564..7460010d4463e 100644 --- a/include/swift/SIL/MemoryLocations.h +++ b/include/swift/SIL/MemoryLocations.h @@ -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``. /// From 33dafb2a45a4058913139314fe9879888696ec06 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:22:12 -0400 Subject: [PATCH 13/87] spelling: construct Signed-off-by: Josh Soref --- include/swift/SIL/OwnershipUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/OwnershipUtils.h b/include/swift/SIL/OwnershipUtils.h index 6beebc1d5a5fe..55bf6d2259c3e 100644 --- a/include/swift/SIL/OwnershipUtils.h +++ b/include/swift/SIL/OwnershipUtils.h @@ -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. From 80ae9e6c7f2e5b0802f010147feaad07ac8cf1be Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:22:42 -0400 Subject: [PATCH 14/87] spelling: conversion Signed-off-by: Josh Soref --- lib/SIL/Utils/InstructionUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Utils/InstructionUtils.cpp b/lib/SIL/Utils/InstructionUtils.cpp index 4352ba9f919a5..02d714bffa359 100644 --- a/lib/SIL/Utils/InstructionUtils.cpp +++ b/lib/SIL/Utils/InstructionUtils.cpp @@ -240,7 +240,7 @@ SILValue swift::stripBorrow(SILValue V) { // All instructions handled here must propagate their first operand into their // single result. // -// This is guaranteed to handle all function-type converstions: ThinToThick, +// This is guaranteed to handle all function-type conversions: ThinToThick, // ConvertFunction, and ConvertEscapeToNoEscapeInst. SingleValueInstruction *swift::getSingleValueCopyOrCast(SILInstruction *I) { if (auto *convert = dyn_cast(I)) From 9ccd80c7e0918dc898519dbdb5adc47fb47e866e Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:23:45 -0400 Subject: [PATCH 15/87] spelling: declarations Signed-off-by: Josh Soref --- test/SIL/Serialization/public_external.sil | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/SIL/Serialization/public_external.sil b/test/SIL/Serialization/public_external.sil index 77cead0ad015f..32d6a22f1cc6c 100644 --- a/test/SIL/Serialization/public_external.sil +++ b/test/SIL/Serialization/public_external.sil @@ -53,7 +53,7 @@ sil shared @se : $@convention(thin) () -> () { // Check that external non-shared functions are serialized only // if they are referenced from something reachable from non-external functions. // Since all these fN functions are referenced only from an external function, -// do not serialize even their declrations. +// do not serialize even their declarations. // CHECK-NOT: sil{{.*}}@fn1 : $@convention(thin) () -> () sil public_external [serialized] [noinline] @fn1 : $@convention(thin) () -> () { From 08207f3003dada7b4597d55a0cf4f363945a6022 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:25:09 -0400 Subject: [PATCH 16/87] spelling: derivation Signed-off-by: Josh Soref --- lib/SIL/Utils/MemAccessUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Utils/MemAccessUtils.cpp b/lib/SIL/Utils/MemAccessUtils.cpp index 854738b5ce55b..4b4fea380bf70 100644 --- a/lib/SIL/Utils/MemAccessUtils.cpp +++ b/lib/SIL/Utils/MemAccessUtils.cpp @@ -534,7 +534,7 @@ isDistinctFrom(const AccessRepresentation &other) const { // Any type of nested/argument address may be within the same object. // // We also currently assume Unidentified access may be within an object - // purely to handle KeyPath accesses. The deriviation of the KeyPath + // purely to handle KeyPath accesses. The derivation of the KeyPath // address must separately appear to be a Class access so that all Class // accesses are accounted for. return false; From 708f551acbfcba71324959f8acc9cc926116a569 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:25:26 -0400 Subject: [PATCH 17/87] spelling: deserialization Signed-off-by: Josh Soref --- include/swift/SIL/SILModule.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILModule.h b/include/swift/SIL/SILModule.h index 63ef8ade8f357..4a74923dc7dea 100644 --- a/include/swift/SIL/SILModule.h +++ b/include/swift/SIL/SILModule.h @@ -431,7 +431,7 @@ class SILModule { /// e.g. an open_existential_addr. /// /// In case the opened archetype is not defined yet (e.g. during parsing or - /// deserilization), a PlaceholderValue is returned. This should not be the + /// deserialization), a PlaceholderValue is returned. This should not be the /// case outside of parsing or deserialization. SILValue getRootOpenedArchetypeDef(CanOpenedArchetypeType archetype, SILFunction *inFunction); From 321352403e9dc0b344fa18fe4cdb879b4122fed0 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:25:34 -0400 Subject: [PATCH 18/87] spelling: destroyed Signed-off-by: Josh Soref --- include/swift/SIL/SILType.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILType.h b/include/swift/SIL/SILType.h index 84db56718c3f6..d91b06340a89d 100644 --- a/include/swift/SIL/SILType.h +++ b/include/swift/SIL/SILType.h @@ -304,7 +304,7 @@ class SILType { bool isAddressOnly(const SILFunction &F) const; /// True if the underlying AST type is trivial, meaning it is loadable and can - /// be trivially copied, moved or detroyed. Returns false for address types + /// be trivially copied, moved or destroyed. Returns false for address types /// even though they are technically trivial. bool isTrivial(const SILFunction &F) const; From 727e3aa97af2a6bb4067d8b29509ef865a28e07b Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:25:38 -0400 Subject: [PATCH 19/87] spelling: determined Signed-off-by: Josh Soref --- include/swift/SIL/PrunedLiveness.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/PrunedLiveness.h b/include/swift/SIL/PrunedLiveness.h index d62b5874b5c02..c5b3d960ecef7 100644 --- a/include/swift/SIL/PrunedLiveness.h +++ b/include/swift/SIL/PrunedLiveness.h @@ -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 From 17c4ce141e474d9c264405ddaa3b39fcfca15c24 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:26:27 -0400 Subject: [PATCH 20/87] spelling: different Signed-off-by: Josh Soref --- lib/SIL/Utils/MemoryLocations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Utils/MemoryLocations.cpp b/lib/SIL/Utils/MemoryLocations.cpp index 9305ca5e3d074..64b79f72aaa4a 100644 --- a/lib/SIL/Utils/MemoryLocations.cpp +++ b/lib/SIL/Utils/MemoryLocations.cpp @@ -422,7 +422,7 @@ bool MemoryLocations::analyzeAddrProjection( isa(projection)); // We can only handle a single enum payload type for a location or or a - // single concrete existential type. Mismatching types can have a differnt + // single concrete existential type. Mismatching types can have a different // number of (non-trivial) sub-locations and we cannot handle this. // But we ignore opened existential types, because those cannot have // sub-locations (there cannot be an address projection on an From b5d7933d71552b0b4f25d35753dbcab53cbe7a2c Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:27:14 -0400 Subject: [PATCH 21/87] spelling: doesn't Signed-off-by: Josh Soref --- lib/SIL/Verifier/MemoryLifetimeVerifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp b/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp index 35c13c4e179f9..a2b174db4b52c 100644 --- a/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp +++ b/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp @@ -629,7 +629,7 @@ void MemoryLifetimeVerifier::checkBlock(SILBasicBlock *block, Bits &bits) { // We don't want to check `debug_value` instructions that // are used to mark variable declarations (e.g. its SSA value is // an alloc_stack), which don't have any `op_deref` in its - // di-expression, because that memory does't need to be initialized + // di-expression, because that memory doesn't need to be initialized // when `debug_value` is referencing it. if (cast(&I)->hasAddrVal() && cast(&I)->exprStartsWithDeref()) From 483ca6cbb3516295c492214fa0e5500e451d28cd Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:28:10 -0400 Subject: [PATCH 22/87] spelling: equality Signed-off-by: Josh Soref --- include/swift/SIL/MemAccessUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/MemAccessUtils.h b/include/swift/SIL/MemAccessUtils.h index 5635ab9786254..5f914d7b8ac00 100644 --- a/include/swift/SIL/MemAccessUtils.h +++ b/include/swift/SIL/MemAccessUtils.h @@ -559,7 +559,7 @@ 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; }; From f499d35755d09f541fcc0bf4c5d15b37f9d66bf7 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:28:19 -0400 Subject: [PATCH 23/87] spelling: equivalent Signed-off-by: Josh Soref --- lib/SIL/Utils/InstructionUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Utils/InstructionUtils.cpp b/lib/SIL/Utils/InstructionUtils.cpp index 02d714bffa359..ccae0acf67980 100644 --- a/lib/SIL/Utils/InstructionUtils.cpp +++ b/lib/SIL/Utils/InstructionUtils.cpp @@ -626,7 +626,7 @@ RuntimeEffect swift::getRuntimeEffect(SILInstruction *inst, SILType &impactType) return RuntimeEffect::MetaData | RuntimeEffect::RefCounting; return RuntimeEffect::MetaData; } - // Equialent to a copy_addr [init] + // Equivalent to a copy_addr [init] case SILInstructionKind::MarkUnresolvedMoveAddrInst: { return RuntimeEffect::MetaData | RuntimeEffect::RefCounting; } From f39e31bf1c9237c18998556a1fd06fa08a5551b5 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:30:45 -0400 Subject: [PATCH 24/87] spelling: formation Signed-off-by: Josh Soref --- include/swift/SIL/OwnershipUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/OwnershipUtils.h b/include/swift/SIL/OwnershipUtils.h index 55bf6d2259c3e..05d0969dbbb11 100644 --- a/include/swift/SIL/OwnershipUtils.h +++ b/include/swift/SIL/OwnershipUtils.h @@ -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, }; From 5733bff12b539a477ea8db4bedfc879a3f2c6a1d Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 17:19:57 -0400 Subject: [PATCH 25/87] spelling: forwards Signed-off-by: Josh Soref --- lib/SIL/Verifier/SILOwnershipVerifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Verifier/SILOwnershipVerifier.cpp b/lib/SIL/Verifier/SILOwnershipVerifier.cpp index b70e72fe0728b..169df700192df 100644 --- a/lib/SIL/Verifier/SILOwnershipVerifier.cpp +++ b/lib/SIL/Verifier/SILOwnershipVerifier.cpp @@ -669,7 +669,7 @@ bool SILValueOwnershipChecker::checkUses() { } } - // Check if we are an instruction that forwards forwards guaranteed + // Check if we are an instruction that forwards guaranteed // ownership. In such a case, we are a subobject projection. We should not // have any lifetime ending uses. if (value.getOwnershipKind() == OwnershipKind::Guaranteed From 42fc5d8ee8caf6eae80d725a0b10280c41d481d2 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:31:26 -0400 Subject: [PATCH 26/87] spelling: global Signed-off-by: Josh Soref --- include/swift/SIL/SILInstruction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILInstruction.h b/include/swift/SIL/SILInstruction.h index 58da913fba3fa..9117f9889a31a 100644 --- a/include/swift/SIL/SILInstruction.h +++ b/include/swift/SIL/SILInstruction.h @@ -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, From b03422538b014a7f8a7c95b88632ae3072ea05fb Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:31:45 -0400 Subject: [PATCH 27/87] spelling: guaranteed Signed-off-by: Josh Soref --- include/swift/SIL/OwnershipUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/OwnershipUtils.h b/include/swift/SIL/OwnershipUtils.h index 05d0969dbbb11..6fe9bf0c41817 100644 --- a/include/swift/SIL/OwnershipUtils.h +++ b/include/swift/SIL/OwnershipUtils.h @@ -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. From 42a214b986bf823d000001f53c30e8e200442795 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:31:58 -0400 Subject: [PATCH 28/87] spelling: have Signed-off-by: Josh Soref --- lib/SIL/Verifier/SILVerifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Verifier/SILVerifier.cpp b/lib/SIL/Verifier/SILVerifier.cpp index af822d7c85b07..41217f36bb09e 100644 --- a/lib/SIL/Verifier/SILVerifier.cpp +++ b/lib/SIL/Verifier/SILVerifier.cpp @@ -346,7 +346,7 @@ void verifyKeyPathComponent(SILModule &M, // TODO: This should probably be unconditionally +1 when we // can represent that. require(newValueParam.getConvention() == normalArgConvention, - "setter value parameter should havee normal arg convention"); + "setter value parameter should have normal arg convention"); auto baseParam = substSetterType->getParameters()[1]; require(baseParam.getConvention() == normalArgConvention From 19a49521ce187d0df3425b7ff560278002f4bfc8 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:32:25 -0400 Subject: [PATCH 29/87] spelling: identify Signed-off-by: Josh Soref --- include/swift/SIL/MemAccessUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/MemAccessUtils.h b/include/swift/SIL/MemAccessUtils.h index 5f914d7b8ac00..54df076f7e379 100644 --- a/include/swift/SIL/MemAccessUtils.h +++ b/include/swift/SIL/MemAccessUtils.h @@ -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; From cb8499f130089aa8ed84d531459cd8b5bfd48b11 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:33:00 -0400 Subject: [PATCH 30/87] spelling: inaccessible Signed-off-by: Josh Soref --- include/swift/SIL/MemAccessUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/MemAccessUtils.h b/include/swift/SIL/MemAccessUtils.h index 54df076f7e379..6385680f877aa 100644 --- a/include/swift/SIL/MemAccessUtils.h +++ b/include/swift/SIL/MemAccessUtils.h @@ -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); } From 32a84ad1924600d20bd02f09ab3f9568d614e236 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:33:21 -0400 Subject: [PATCH 31/87] spelling: indeterminate Signed-off-by: Josh Soref --- include/swift/SIL/OwnershipUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/OwnershipUtils.h b/include/swift/SIL/OwnershipUtils.h index 6fe9bf0c41817..f58560fcf6d43 100644 --- a/include/swift/SIL/OwnershipUtils.h +++ b/include/swift/SIL/OwnershipUtils.h @@ -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. From 02f641c536acb9da8ca778409ac6939a3fd35a4c Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:33:27 -0400 Subject: [PATCH 32/87] spelling: indices Signed-off-by: Josh Soref --- lib/SIL/Utils/MemAccessUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Utils/MemAccessUtils.cpp b/lib/SIL/Utils/MemAccessUtils.cpp index 4b4fea380bf70..2650f1106ab15 100644 --- a/lib/SIL/Utils/MemAccessUtils.cpp +++ b/lib/SIL/Utils/MemAccessUtils.cpp @@ -1525,7 +1525,7 @@ class AccessPathDefUseTraversal { // Indices of the path to match from inner to outer component. // A cursor is used to represent the most recently visited def. - // During def-use traversal, the cursor starts at the end of pathIndicies and + // During def-use traversal, the cursor starts at the end of pathIndices and // decrements with each projection. // The first index represents an exact match. // Index < 0 represents some subobject of the requested path. From 46918ed62f72c3c7b15f0e70c20b67a2d4db096e Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:33:34 -0400 Subject: [PATCH 33/87] spelling: inefficient Signed-off-by: Josh Soref --- include/swift/SIL/OwnershipUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/OwnershipUtils.h b/include/swift/SIL/OwnershipUtils.h index f58560fcf6d43..01164510fc7ec 100644 --- a/include/swift/SIL/OwnershipUtils.h +++ b/include/swift/SIL/OwnershipUtils.h @@ -90,7 +90,7 @@ 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 From 54aabd6e59cc40521fad1621c2336dc618661993 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:33:47 -0400 Subject: [PATCH 34/87] spelling: inheritance Signed-off-by: Josh Soref --- lib/SIL/IR/SILInstruction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/SILInstruction.cpp b/lib/SIL/IR/SILInstruction.cpp index 2a8a4c504d1df..5d2aab6c6ed0f 100644 --- a/lib/SIL/IR/SILInstruction.cpp +++ b/lib/SIL/IR/SILInstruction.cpp @@ -1444,7 +1444,7 @@ SILInstructionResultArray::SILInstructionResultArray( auto *Value = static_cast(SVI); assert(uintptr_t(Value) != uintptr_t(SVI) && "Expected value to be offset from SVI since it is not the first " - "multi-inheritence parent"); + "multi-inheritance parent"); Pointer = reinterpret_cast(Value); #ifndef NDEBUG From 5bfd0c0c1b18ea317d95736a51cf5b11a556616d Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:34:53 -0400 Subject: [PATCH 35/87] spelling: instantaneous Signed-off-by: Josh Soref --- lib/SIL/IR/OperandOwnership.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/OperandOwnership.cpp b/lib/SIL/IR/OperandOwnership.cpp index 0975bf9154359..6f617f2c8ee9d 100644 --- a/lib/SIL/IR/OperandOwnership.cpp +++ b/lib/SIL/IR/OperandOwnership.cpp @@ -430,7 +430,7 @@ OperandOwnershipClassifier::visitStoreBorrowInst(StoreBorrowInst *i) { return OperandOwnership::TrivialUse; } -// Get the OperandOwnership for instaneous apply, yield, and return uses. +// Get the OperandOwnership for instantaneous apply, yield, and return uses. // This does not apply to uses that begin an explicit borrow scope in the // caller, such as begin_apply. static OperandOwnership getFunctionArgOwnership(SILArgumentConvention argConv, From 284fa1f9365d83cfd7e275c8c3015ea9507283a3 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:35:09 -0400 Subject: [PATCH 36/87] spelling: instruction Signed-off-by: Josh Soref --- include/swift/SIL/PrunedLiveness.h | 2 +- include/swift/SIL/SILInstruction.h | 2 +- include/swift/SIL/SILModule.h | 2 +- lib/SIL/IR/SILInstruction.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/swift/SIL/PrunedLiveness.h b/include/swift/SIL/PrunedLiveness.h index c5b3d960ecef7..e1d6b10522adb 100644 --- a/include/swift/SIL/PrunedLiveness.h +++ b/include/swift/SIL/PrunedLiveness.h @@ -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 diff --git a/include/swift/SIL/SILInstruction.h b/include/swift/SIL/SILInstruction.h index 9117f9889a31a..52602b5576df5 100644 --- a/include/swift/SIL/SILInstruction.h +++ b/include/swift/SIL/SILInstruction.h @@ -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; diff --git a/include/swift/SIL/SILModule.h b/include/swift/SIL/SILModule.h index 4a74923dc7dea..9ac398e4968b4 100644 --- a/include/swift/SIL/SILModule.h +++ b/include/swift/SIL/SILModule.h @@ -334,7 +334,7 @@ class SILModule { /// A mapping from root opened archetypes to the instructions which define /// them. /// - /// The value is either a SingleValueInstrution or a PlaceholderValue, in case + /// The value is either a SingleValueInstruction or a PlaceholderValue, in case /// an opened archetype definition is looked up during parsing or /// deserializing SIL, where opened archetypes can be forward referenced. /// diff --git a/lib/SIL/IR/SILInstruction.cpp b/lib/SIL/IR/SILInstruction.cpp index 5d2aab6c6ed0f..ab006745727e8 100644 --- a/lib/SIL/IR/SILInstruction.cpp +++ b/lib/SIL/IR/SILInstruction.cpp @@ -240,7 +240,7 @@ SILInstructionKind swift::getSILInstructionKind(StringRef name) { llvm::errs() << "Unknown SIL instruction name\n"; abort(); #endif - llvm_unreachable("Unknown SIL insruction name"); + llvm_unreachable("Unknown SIL instruction name"); } /// Map SILInstructionKind to a corresponding SILInstruction name. From 22a6d531b50e4c0c0aaafc72ddc48977c6bf8371 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:35:25 -0400 Subject: [PATCH 37/87] spelling: intentionally Signed-off-by: Josh Soref --- include/swift/SIL/BasicBlockDatastructures.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/BasicBlockDatastructures.h b/include/swift/SIL/BasicBlockDatastructures.h index 4265faf7773ec..2e83bd39b505a 100644 --- a/include/swift/SIL/BasicBlockDatastructures.h +++ b/include/swift/SIL/BasicBlockDatastructures.h @@ -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 vector; From ce089de2ed54d8616b609f596a1718c2e6597ecb Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:35:41 -0400 Subject: [PATCH 38/87] spelling: interior Signed-off-by: Josh Soref --- include/swift/SIL/OwnershipUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/OwnershipUtils.h b/include/swift/SIL/OwnershipUtils.h index 01164510fc7ec..18a31d4715c61 100644 --- a/include/swift/SIL/OwnershipUtils.h +++ b/include/swift/SIL/OwnershipUtils.h @@ -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); From 23779e4fdc7045568c77fb0a59aea9841a00626a Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:35:59 -0400 Subject: [PATCH 39/87] spelling: intrinsic Signed-off-by: Josh Soref --- lib/SIL/Utils/MemAccessUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Utils/MemAccessUtils.cpp b/lib/SIL/Utils/MemAccessUtils.cpp index 2650f1106ab15..4802555d63455 100644 --- a/lib/SIL/Utils/MemAccessUtils.cpp +++ b/lib/SIL/Utils/MemAccessUtils.cpp @@ -2508,7 +2508,7 @@ static void visitBuiltinAddress(BuiltinInst *builtin, } if (auto ID = builtin->getIntrinsicID()) { switch (ID.getValue()) { - // Exhaustively verifying all LLVM instrinsics that access memory is + // Exhaustively verifying all LLVM intrinsics that access memory is // impractical. Instead, we call out the few common cases and return in // the default case. default: From 66e808604ad1124280e6f208d3726ae086a1f36b Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:36:04 -0400 Subject: [PATCH 40/87] spelling: introducing Signed-off-by: Josh Soref --- include/swift/SIL/OwnershipUtils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/swift/SIL/OwnershipUtils.h b/include/swift/SIL/OwnershipUtils.h index 18a31d4715c61..2841073740d31 100644 --- a/include/swift/SIL/OwnershipUtils.h +++ b/include/swift/SIL/OwnershipUtils.h @@ -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 &scopeEndingInsts) const; @@ -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 visitor) const; bool isLocalScope() const { return kind.isLocalScope(); } From 2d3a35131379f70f63cb31a1c9927cda54f0997a Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:36:22 -0400 Subject: [PATCH 41/87] spelling: irrelevant Signed-off-by: Josh Soref --- include/swift/SIL/SILInstruction.h | 4 ++-- lib/SIL/Utils/PrunedLiveness.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/swift/SIL/SILInstruction.h b/include/swift/SIL/SILInstruction.h index 52602b5576df5..b0acf4f224dd3 100644 --- a/include/swift/SIL/SILInstruction.h +++ b/include/swift/SIL/SILInstruction.h @@ -121,11 +121,11 @@ StringRef getSILInstructionName(SILInstructionKind Kind); /// that just from the number of elements we can infer the size of each element /// due to the restricted problem space. Specificially: /// -/// 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). diff --git a/lib/SIL/Utils/PrunedLiveness.cpp b/lib/SIL/Utils/PrunedLiveness.cpp index b3d43124800d2..da272457cc107 100644 --- a/lib/SIL/Utils/PrunedLiveness.cpp +++ b/lib/SIL/Utils/PrunedLiveness.cpp @@ -279,7 +279,7 @@ void PrunedLivenessBoundary::compute(const PrunedLiveness &liveness, switch (liveness.getBlockLiveness(bb)) { case PrunedLiveBlocks::LiveOut: // A lifetimeEndBlock may be determined to be LiveOut after analyzing the - // extended liveness. It is irrelevent for finding the boundary. + // extended liveness. It is irrelevant for finding the boundary. break; case PrunedLiveBlocks::LiveWithin: { // The liveness boundary is inside this block. Insert a final destroy From 86e319e978f9c4ae2e6ad5a7c99dbe2d9debefbb Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:37:28 -0400 Subject: [PATCH 42/87] spelling: message Signed-off-by: Josh Soref --- lib/SIL/Utils/SILBridging.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SIL/Utils/SILBridging.cpp b/lib/SIL/Utils/SILBridging.cpp index fe1d1115dc099..46978577158a5 100644 --- a/lib/SIL/Utils/SILBridging.cpp +++ b/lib/SIL/Utils/SILBridging.cpp @@ -694,10 +694,10 @@ BridgedInstruction SILBuilder_createBuiltinBinaryFunction( } BridgedInstruction SILBuilder_createCondFail(BridgedInstruction insertionPoint, - BridgedLocation loc, BridgedValue condition, BridgedStringRef messge) { + BridgedLocation loc, BridgedValue condition, BridgedStringRef message) { SILBuilder builder(castToInst(insertionPoint), getSILDebugScope(loc)); return {builder.createCondFail(getRegularLocation(loc), - castToSILValue(condition), getStringRef(messge))}; + castToSILValue(condition), getStringRef(message))}; } BridgedInstruction SILBuilder_createIntegerLiteral(BridgedInstruction insertionPoint, From cd669e61bb97d5ad17f3ebb6194d19c867fc2099 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:38:12 -0400 Subject: [PATCH 43/87] spelling: multi Signed-off-by: Josh Soref --- SwiftCompilerSources/Sources/SIL/Effects.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwiftCompilerSources/Sources/SIL/Effects.swift b/SwiftCompilerSources/Sources/SIL/Effects.swift index a9af7d288af11..5a2fd0be75d85 100644 --- a/SwiftCompilerSources/Sources/SIL/Effects.swift +++ b/SwiftCompilerSources/Sources/SIL/Effects.swift @@ -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 { From e86a4a66ddf2e8f33d2acb8a6a8ef2d2a0338020 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:38:39 -0400 Subject: [PATCH 44/87] spelling: necessarily Signed-off-by: Josh Soref --- include/swift/SIL/ApplySite.h | 2 +- include/swift/SIL/MemAccessUtils.h | 2 +- include/swift/SIL/PrunedLiveness.h | 2 +- lib/SIL/Verifier/SILVerifier.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/swift/SIL/ApplySite.h b/include/swift/SIL/ApplySite.h index e74c27716fa3e..9c2a3e0cd1d78 100644 --- a/include/swift/SIL/ApplySite.h +++ b/include/swift/SIL/ApplySite.h @@ -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). // diff --git a/include/swift/SIL/MemAccessUtils.h b/include/swift/SIL/MemAccessUtils.h index 6385680f877aa..daca92d07bf5a 100644 --- a/include/swift/SIL/MemAccessUtils.h +++ b/include/swift/SIL/MemAccessUtils.h @@ -567,7 +567,7 @@ class AccessRepresentation { /// 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 { diff --git a/include/swift/SIL/PrunedLiveness.h b/include/swift/SIL/PrunedLiveness.h index e1d6b10522adb..7365b8d3493a1 100644 --- a/include/swift/SIL/PrunedLiveness.h +++ b/include/swift/SIL/PrunedLiveness.h @@ -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 postDomBlocks); diff --git a/lib/SIL/Verifier/SILVerifier.cpp b/lib/SIL/Verifier/SILVerifier.cpp index 41217f36bb09e..4db18644a02f0 100644 --- a/lib/SIL/Verifier/SILVerifier.cpp +++ b/lib/SIL/Verifier/SILVerifier.cpp @@ -1011,7 +1011,7 @@ class SILVerifier : public SILVerifierBase { // Address-only values are potentially unmovable when borrowed. See also // checkOwnershipForwardingInst. A phi implies a move of its arguments - // because they can't necessarilly all reuse the same storage. + // because they can't necessarily all reuse the same storage. require((!arg->getType().isAddressOnly(F) || arg->getOwnershipKind() != OwnershipKind::Guaranteed), "Guaranteed address-only phi not allowed--implies a copy"); From 21af5cbb4606c40210c54bfb86ec64cb23931296 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 16:01:15 -0400 Subject: [PATCH 45/87] spelling: object Signed-off-by: Josh Soref --- test/SIL/Parser/basic.sil | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/SIL/Parser/basic.sil b/test/SIL/Parser/basic.sil index 4a92177607135..5dd029b0000bc 100644 --- a/test/SIL/Parser/basic.sil +++ b/test/SIL/Parser/basic.sil @@ -1232,7 +1232,7 @@ bb0: // CHECK-LABEL: sil @test_alloc_stack_flags sil @test_alloc_stack_flags : $() -> () { - // CHECK: alloc_stack $Builtin.NativeObjec + // CHECK: alloc_stack $Builtin.NativeObject %instance = alloc_stack $Builtin.NativeObject dealloc_stack %instance : $*Builtin.NativeObject // CHECK: alloc_stack [dynamic_lifetime] From 6993b97044e83a5b895f79f06a6020c6177d605a Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 21:41:01 -0400 Subject: [PATCH 46/87] spelling: one Signed-off-by: Josh Soref --- lib/SIL/Utils/DynamicCasts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Utils/DynamicCasts.cpp b/lib/SIL/Utils/DynamicCasts.cpp index b989ae868d736..319a9ade66fa5 100644 --- a/lib/SIL/Utils/DynamicCasts.cpp +++ b/lib/SIL/Utils/DynamicCasts.cpp @@ -279,7 +279,7 @@ static CanType getHashableExistentialType(ModuleDecl *M) { // // let c = b as! C // releases __SwiftValue // -// After unwrapping Optional, the type may fall into one one of +// After unwrapping Optional, the type may fall into one of // the following categories that are relevant for cast ownership: // // Class-bound types (hasReferenceSemantics() && !isPotentiallyAnyObject()) From 29a82ffe4dbe3ec4d0ff6ac15ff7129352b95cc0 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:40:02 -0400 Subject: [PATCH 47/87] spelling: optimization Signed-off-by: Josh Soref --- SwiftCompilerSources/Sources/SIL/SubstitutionMap.swift | 2 +- include/swift/SIL/SILModule.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SwiftCompilerSources/Sources/SIL/SubstitutionMap.swift b/SwiftCompilerSources/Sources/SIL/SubstitutionMap.swift index 092e95ade9700..efeaa2da2bf0f 100644 --- a/SwiftCompilerSources/Sources/SIL/SubstitutionMap.swift +++ b/SwiftCompilerSources/Sources/SIL/SubstitutionMap.swift @@ -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 // diff --git a/include/swift/SIL/SILModule.h b/include/swift/SIL/SILModule.h index 9ac398e4968b4..8b523d5fd38f7 100644 --- a/include/swift/SIL/SILModule.h +++ b/include/swift/SIL/SILModule.h @@ -274,7 +274,7 @@ class SILModule { /// Declarations which are externally visible. /// /// These are method declarations which are referenced from inlinable - /// functions due to cross-module-optimzation. Those declarations don't have + /// functions due to cross-module-optimization. Those declarations don't have /// any attributes or linkage which mark them as externally visible by /// default. /// Currently this table is not serialized. From 60bf269cfb376f91fecf69cf22de6193bf9c22f0 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:40:26 -0400 Subject: [PATCH 48/87] spelling: otherwise Signed-off-by: Josh Soref --- include/swift/SIL/SILType.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILType.h b/include/swift/SIL/SILType.h index d91b06340a89d..aed2b02a30988 100644 --- a/include/swift/SIL/SILType.h +++ b/include/swift/SIL/SILType.h @@ -501,7 +501,7 @@ class SILType { } /// Return the reference ownership of this type if it is a reference storage - /// type. Otherwse, return None. + /// type. Otherwise, return None. Optional getReferenceStorageOwnership() const { auto type = getASTType()->getAs(); if (!type) From 1b4c5d45cfa7a7cb9fcb375ea41b6dea1969d906 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:41:02 -0400 Subject: [PATCH 49/87] spelling: overridden Signed-off-by: Josh Soref --- include/swift/SIL/SILBuilder.h | 2 +- lib/SIL/IR/OperandOwnership.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/swift/SIL/SILBuilder.h b/include/swift/SIL/SILBuilder.h index 0a051fcab6bb5..398bebc64be5e 100644 --- a/include/swift/SIL/SILBuilder.h +++ b/include/swift/SIL/SILBuilder.h @@ -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); diff --git a/lib/SIL/IR/OperandOwnership.cpp b/lib/SIL/IR/OperandOwnership.cpp index 6f617f2c8ee9d..9e746fd21398b 100644 --- a/lib/SIL/IR/OperandOwnership.cpp +++ b/lib/SIL/IR/OperandOwnership.cpp @@ -39,7 +39,7 @@ namespace { class OperandOwnershipClassifier : public SILInstructionVisitor { LLVM_ATTRIBUTE_UNUSED SILModule &mod; - // Allow module conventions to be overriden while lowering between canonical + // Allow module conventions to be overridden while lowering between canonical // and lowered SIL stages. SILModuleConventions silConv; From 170dd8abf12816a68d835ffa87a532e9621bd1bd Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:41:21 -0400 Subject: [PATCH 50/87] spelling: parameter Signed-off-by: Josh Soref --- SwiftCompilerSources/Sources/SIL/Effects.swift | 2 +- include/swift/SIL/SILConstants.h | 2 +- lib/SIL/IR/SILFunctionType.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SwiftCompilerSources/Sources/SIL/Effects.swift b/SwiftCompilerSources/Sources/SIL/Effects.swift index 5a2fd0be75d85..24e367653fc93 100644 --- a/SwiftCompilerSources/Sources/SIL/Effects.swift +++ b/SwiftCompilerSources/Sources/SIL/Effects.swift @@ -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 diff --git a/include/swift/SIL/SILConstants.h b/include/swift/SIL/SILConstants.h index 5ed2a4e2eed43..dab81c44014c8 100644 --- a/include/swift/SIL/SILConstants.h +++ b/include/swift/SIL/SILConstants.h @@ -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; diff --git a/lib/SIL/IR/SILFunctionType.cpp b/lib/SIL/IR/SILFunctionType.cpp index 14b432543a4db..266c88b55bfe3 100644 --- a/lib/SIL/IR/SILFunctionType.cpp +++ b/lib/SIL/IR/SILFunctionType.cpp @@ -716,7 +716,7 @@ static CanSILFunctionType getAutoDiffPullbackType( std::distance(originalFnTy->getParameters().begin(), &*inoutParamIt); auto inoutParam = originalFnTy->getParameters()[paramIndex]; // The pullback parameter convention depends on whether the original `inout` - // paramater is a differentiability parameter. + // parameter is a differentiability parameter. // - If yes, the pullback parameter convention is `@inout`. // - If no, the pullback parameter convention is `@in_guaranteed`. auto inoutParamTanType = getAutoDiffTangentTypeForLinearMap( From f67eef033ce6aa4b20beb7eeebbbbfbbedec0113 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:41:56 -0400 Subject: [PATCH 51/87] spelling: pattern Signed-off-by: Josh Soref --- lib/SIL/IR/SILFunctionType.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/SILFunctionType.cpp b/lib/SIL/IR/SILFunctionType.cpp index 266c88b55bfe3..ff2d6c138b480 100644 --- a/lib/SIL/IR/SILFunctionType.cpp +++ b/lib/SIL/IR/SILFunctionType.cpp @@ -3943,7 +3943,7 @@ class SILTypeSubstituter : // add the appropriate invocation substitutions. // // - Otherwise, if there are pattern substitutions, just substitute - // those; the other components are inside the patttern generic + // those; the other components are inside the pattern generic // signature. // // - Otherwise, substitute the basic components. From e36df8d1b4a3ac2bdaa226cd722195e4793066ec Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:42:18 -0400 Subject: [PATCH 52/87] spelling: pipeline Signed-off-by: Josh Soref --- include/swift/SIL/SILModule.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILModule.h b/include/swift/SIL/SILModule.h index 8b523d5fd38f7..c0285873c83c9 100644 --- a/include/swift/SIL/SILModule.h +++ b/include/swift/SIL/SILModule.h @@ -170,7 +170,7 @@ class SILModule { /// Link functions with shared linkage. Used by the mandatory pipeline. LinkNormal, - /// Link all functions. Used by the performance pipeine. + /// Link all functions. Used by the performance pipeline. LinkAll }; From d0d67d7dab6fc85f6506c991b939afe22fc58ff4 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:42:34 -0400 Subject: [PATCH 53/87] spelling: possibility Signed-off-by: Josh Soref --- lib/SIL/Verifier/SILVerifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Verifier/SILVerifier.cpp b/lib/SIL/Verifier/SILVerifier.cpp index 4db18644a02f0..ca7dd1c350ccb 100644 --- a/lib/SIL/Verifier/SILVerifier.cpp +++ b/lib/SIL/Verifier/SILVerifier.cpp @@ -2304,7 +2304,7 @@ class SILVerifier : public SILVerifierBase { // those accesses. identifyFormalAccess(BAI); // FIXME: rdar://57291811 - the following check for valid storage will be - // reenabled shortly. A fix is planned. In the meantime, the possiblity that + // reenabled shortly. A fix is planned. In the meantime, the possibility that // a real miscompilation could be caused by this failure is insignificant. // I will probably enable a much broader SILVerification of address-type // block arguments first to ensure we never hit this check again. From 07ff4e3ea99192fee68b4c10cc04c6700f8a7e30 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:42:38 -0400 Subject: [PATCH 54/87] spelling: postdominance Signed-off-by: Josh Soref --- include/swift/SIL/BasicBlockUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/BasicBlockUtils.h b/include/swift/SIL/BasicBlockUtils.h index d8875ab59ef10..3fb1dcce5b660 100644 --- a/include/swift/SIL/BasicBlockUtils.h +++ b/include/swift/SIL/BasicBlockUtils.h @@ -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 From ab473ffb37cac0a45022235a5f526474a63e3141 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:44:05 -0400 Subject: [PATCH 55/87] spelling: providing Signed-off-by: Josh Soref --- lib/SIL/IR/TypeLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/TypeLowering.cpp b/lib/SIL/IR/TypeLowering.cpp index 4c8c8d88a0ed4..4326f59e1c699 100644 --- a/lib/SIL/IR/TypeLowering.cpp +++ b/lib/SIL/IR/TypeLowering.cpp @@ -3317,7 +3317,7 @@ class HaveDifferentAbstractStructure return (isa(type) || isa(type)); }; - // We can fast-path some of these checks by proviing these two overrides: + // We can fast-path some of these checks by providing these two overrides: bool visitSubstitutableType(CanSubstitutableType type1, CanSubstitutableType type2) { return false; From 5829eb6445c9e9a139e6b34f9558d88b0a6230ab Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:44:27 -0400 Subject: [PATCH 56/87] spelling: reached Signed-off-by: Josh Soref --- lib/SIL/Utils/MemAccessUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Utils/MemAccessUtils.cpp b/lib/SIL/Utils/MemAccessUtils.cpp index 4802555d63455..be5b933c09735 100644 --- a/lib/SIL/Utils/MemAccessUtils.cpp +++ b/lib/SIL/Utils/MemAccessUtils.cpp @@ -1535,7 +1535,7 @@ class AccessPathDefUseTraversal { // prior to reaching the base address. struct DFSEntry { // Next potential use to visit and flag indicating whether traversal has - // reachaed the access base yet. + // reached the access base yet. llvm::PointerIntPair useAndIsRef; int pathCursor; // position within pathIndices int offset; // index_addr offsets seen prior to this use From 8089c7aea76c487b1fc3b0370edb636a3d8fb819 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:44:36 -0400 Subject: [PATCH 57/87] spelling: recognized Signed-off-by: Josh Soref --- lib/SIL/Utils/MemAccessUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Utils/MemAccessUtils.cpp b/lib/SIL/Utils/MemAccessUtils.cpp index be5b933c09735..6be1b3364782b 100644 --- a/lib/SIL/Utils/MemAccessUtils.cpp +++ b/lib/SIL/Utils/MemAccessUtils.cpp @@ -80,7 +80,7 @@ class AccessPhiVisitor } } // If the result is now invalid, reset it and process the current phi as an - // unrecgonized access instead. + // unrecognized access instead. if (!useDefVisitor.isResultValid()) { useDefVisitor.restoreResult(savedResult); visitNonAccess(phiArg); From 860250748205a0cdce0a4786e2f58003420feebe Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:45:18 -0400 Subject: [PATCH 58/87] spelling: refrigerator Signed-off-by: Josh Soref --- include/swift/SIL/AbstractionPattern.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/swift/SIL/AbstractionPattern.h b/include/swift/SIL/AbstractionPattern.h index 45ea827e5d996..7514fdfd28bf6 100644 --- a/include/swift/SIL/AbstractionPattern.h +++ b/include/swift/SIL/AbstractionPattern.h @@ -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: @@ -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: @@ -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: From 2049db1b4adfdcdf2c098106f9082349aff09f45 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:45:37 -0400 Subject: [PATCH 59/87] spelling: remaining Signed-off-by: Josh Soref --- include/swift/SIL/MemAccessUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/MemAccessUtils.h b/include/swift/SIL/MemAccessUtils.h index daca92d07bf5a..3408ccb15b5d9 100644 --- a/include/swift/SIL/MemAccessUtils.h +++ b/include/swift/SIL/MemAccessUtils.h @@ -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 From bd66d9c9109087a731f6d4da326d96f7aa27db84 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:46:35 -0400 Subject: [PATCH 60/87] spelling: resilient Signed-off-by: Josh Soref --- lib/SIL/IR/TypeLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/TypeLowering.cpp b/lib/SIL/IR/TypeLowering.cpp index 4326f59e1c699..37f1936740595 100644 --- a/lib/SIL/IR/TypeLowering.cpp +++ b/lib/SIL/IR/TypeLowering.cpp @@ -1784,7 +1784,7 @@ namespace { // // Note: if the type is in a different module, the lowering does // not depend on the resilience expansion, so we do not need to set - // the isResilent() flag above. + // the isResilient() flag above. if (!sameModule || Expansion.getResilienceExpansion() == ResilienceExpansion::Minimal) { properties.addSubobject(RecursiveProperties::forOpaque()); From ec3b48d5bd1ee006c708ccf52d6a05860f5e2185 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:46:54 -0400 Subject: [PATCH 61/87] spelling: retrieve Signed-off-by: Josh Soref --- lib/SIL/Verifier/SILVerifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Verifier/SILVerifier.cpp b/lib/SIL/Verifier/SILVerifier.cpp index ca7dd1c350ccb..73e16f4430f3f 100644 --- a/lib/SIL/Verifier/SILVerifier.cpp +++ b/lib/SIL/Verifier/SILVerifier.cpp @@ -1301,7 +1301,7 @@ class SILVerifier : public SILVerifierBase { if (!varInfo) return; - // Retrive debug variable type + // Retrieve debug variable type SILType DebugVarTy; if (varInfo->Type) DebugVarTy = *varInfo->Type; From 50085bdd3c79143c6aaedabf40a43c4c97edb051 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:48:00 -0400 Subject: [PATCH 62/87] spelling: scavenge Signed-off-by: Josh Soref --- include/swift/SIL/SILInstruction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILInstruction.h b/include/swift/SIL/SILInstruction.h index b0acf4f224dd3..75bf2ff2ea895 100644 --- a/include/swift/SIL/SILInstruction.h +++ b/include/swift/SIL/SILInstruction.h @@ -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); From 4b6106e762f6f9e09e9551e4f006f39b9deb33f7 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:48:04 -0400 Subject: [PATCH 63/87] spelling: scheduled Signed-off-by: Josh Soref --- include/swift/SIL/SILModule.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILModule.h b/include/swift/SIL/SILModule.h index c0285873c83c9..1e319ccd7f277 100644 --- a/include/swift/SIL/SILModule.h +++ b/include/swift/SIL/SILModule.h @@ -935,7 +935,7 @@ class SILModule { /// See scheduledForDeletion for details. void scheduleForDeletion(SILInstruction *I); - /// Deletes all scheuled instructions for real. + /// Deletes all scheduled instructions for real. /// See scheduledForDeletion for details. void flushDeletedInsts(); From 50294ebc74b7df27d4badded54331e443f5ec7af Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:48:13 -0400 Subject: [PATCH 64/87] spelling: separately Signed-off-by: Josh Soref --- include/swift/SIL/RuntimeEffect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/RuntimeEffect.h b/include/swift/SIL/RuntimeEffect.h index 819a192e369b5..85616a6882dcb 100644 --- a/include/swift/SIL/RuntimeEffect.h +++ b/include/swift/SIL/RuntimeEffect.h @@ -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. From c5d840734bdb9407371ed6d56e58c11b9069a5d8 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:48:21 -0400 Subject: [PATCH 65/87] spelling: serializable Signed-off-by: Josh Soref --- test/SIL/Serialization/function-global-function.sil | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/SIL/Serialization/function-global-function.sil b/test/SIL/Serialization/function-global-function.sil index eb31e4bcb179e..16d9dc4e11180 100644 --- a/test/SIL/Serialization/function-global-function.sil +++ b/test/SIL/Serialization/function-global-function.sil @@ -4,7 +4,7 @@ sil_stage canonical import Builtin -// Check that we don't crash if a serialiable function is referenced from the +// Check that we don't crash if a serializable function is referenced from the // initializer of a global variable. sil_global [serialized] @globalFuncPtr : $@callee_guaranteed () -> () = { From aae5752bebffebad892a4480944b214350317e5a Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:48:36 -0400 Subject: [PATCH 66/87] spelling: signature Signed-off-by: Josh Soref --- lib/SIL/IR/SILFunctionType.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/SILFunctionType.cpp b/lib/SIL/IR/SILFunctionType.cpp index ff2d6c138b480..25daa9cdfc1a3 100644 --- a/lib/SIL/IR/SILFunctionType.cpp +++ b/lib/SIL/IR/SILFunctionType.cpp @@ -3969,7 +3969,7 @@ class SILTypeSubstituter : auto patternSubs = origType->getPatternSubstitutions(); - // If we have an invocation signatture, we generally shouldn't + // If we have an invocation signature, we generally shouldn't // substitute into the pattern substitutions and component types. if (auto sig = origType->getInvocationGenericSignature()) { // Substitute the invocation substitutions if present. From 32cfbe0211efb8faa55b4061e21c392ef72c26cf Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:48:52 -0400 Subject: [PATCH 67/87] spelling: simplicity Signed-off-by: Josh Soref --- lib/SIL/IR/SILBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/SILBuilder.cpp b/lib/SIL/IR/SILBuilder.cpp index b36617498d311..29406cb428a28 100644 --- a/lib/SIL/IR/SILBuilder.cpp +++ b/lib/SIL/IR/SILBuilder.cpp @@ -638,7 +638,7 @@ void SILBuilder::emitScopedBorrowOperation(SILLocation loc, SILValue original, /// copy. This does require the client code to handle ending the lifetime of an /// owned result even if the input was passed as guaranteed. /// -/// Note: For simplicitly, ownership None is not propagated for any statically +/// Note: For simplicity, ownership None is not propagated for any statically /// nontrivial result, even if \p targetType may also be dynamically /// trivial. For example, the operand of a switch_enum could be a nested enum /// such that all switch cases may be dynamically trivial. Or a checked_cast_br From bef29702b753cc0afdab4bd88194af629df4ee8c Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:49:48 -0400 Subject: [PATCH 68/87] spelling: specifically Signed-off-by: Josh Soref --- include/swift/SIL/SILInstruction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILInstruction.h b/include/swift/SIL/SILInstruction.h index 75bf2ff2ea895..ff1a743ee5503 100644 --- a/include/swift/SIL/SILInstruction.h +++ b/include/swift/SIL/SILInstruction.h @@ -119,7 +119,7 @@ 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 irrelevant. /// 2. Size == 1 implies we either had a single value instruction or a multiple From df9c6097a86dbefca3e9c068f1e497d719aae354 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:50:22 -0400 Subject: [PATCH 69/87] spelling: substituted Signed-off-by: Josh Soref --- lib/SIL/IR/SILFunctionType.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/SIL/IR/SILFunctionType.cpp b/lib/SIL/IR/SILFunctionType.cpp index 25daa9cdfc1a3..b3cce380061b5 100644 --- a/lib/SIL/IR/SILFunctionType.cpp +++ b/lib/SIL/IR/SILFunctionType.cpp @@ -4630,7 +4630,7 @@ static bool areABICompatibleParamsOrReturns(SILType a, SILType b, // Opaque types are compatible with their substitution. if (inFunction) { - auto opaqueTypesSubsituted = aa; + auto opaqueTypesSubstituted = aa; auto *dc = inFunction->getDeclContext(); auto *currentModule = inFunction->getModule().getSwiftModule(); if (!dc || !dc->isChildContextOf(currentModule)) @@ -4639,15 +4639,15 @@ static bool areABICompatibleParamsOrReturns(SILType a, SILType b, dc, inFunction->getResilienceExpansion(), inFunction->getModule().isWholeModule()); if (aa.getASTType()->hasOpaqueArchetype()) - opaqueTypesSubsituted = aa.subst(inFunction->getModule(), replacer, + opaqueTypesSubstituted = aa.subst(inFunction->getModule(), replacer, replacer, CanGenericSignature(), true); - auto opaqueTypesSubsituted2 = bb; + auto opaqueTypesSubstituted2 = bb; if (bb.getASTType()->hasOpaqueArchetype()) - opaqueTypesSubsituted2 = + opaqueTypesSubstituted2 = bb.subst(inFunction->getModule(), replacer, replacer, CanGenericSignature(), true); - if (opaqueTypesSubsituted == opaqueTypesSubsituted2) + if (opaqueTypesSubstituted == opaqueTypesSubstituted2) continue; } From 2d18c4888f189fa1803da1f329bd1887af9971bc Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:50:24 -0400 Subject: [PATCH 70/87] spelling: substitution Signed-off-by: Josh Soref --- lib/SIL/Utils/DynamicCasts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Utils/DynamicCasts.cpp b/lib/SIL/Utils/DynamicCasts.cpp index 319a9ade66fa5..79d3dcca8853a 100644 --- a/lib/SIL/Utils/DynamicCasts.cpp +++ b/lib/SIL/Utils/DynamicCasts.cpp @@ -295,7 +295,7 @@ static CanType getHashableExistentialType(ModuleDecl *M) { // Potentially bridged values: // - includes struct, enum, non-class archetype, non-class existential, // and non-objc-metatype -// - these types are potentially trivial after subsitution. If so, then they +// - these types are potentially trivial after substitution. If so, then they // convert to a reference when casting to AnyObject or certain classes // // Any and AnyObject existentials: From 96cd9734740d8c3a765d14df3f8a6303465e08dd Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:50:35 -0400 Subject: [PATCH 71/87] spelling: subtypes Signed-off-by: Josh Soref --- include/swift/SIL/TypeLowering.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/TypeLowering.h b/include/swift/SIL/TypeLowering.h index 7686bc4e36b38..0f4b139998561 100644 --- a/include/swift/SIL/TypeLowering.h +++ b/include/swift/SIL/TypeLowering.h @@ -421,7 +421,7 @@ class TypeLowering { DirectChildren, ///> Expand the value into its direct children and place ///> operations on the children. MostDerivedDescendents, ///> Expand the value into its most derived - ///> substypes and perform operations on these + ///> subtypes and perform operations on these ///> types. }; From 41e235a64e930ed1894fd1e7232b3c8f3233c3f0 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:50:58 -0400 Subject: [PATCH 72/87] spelling: supplement Signed-off-by: Josh Soref --- lib/SIL/IR/SILDebugInfoExpression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/SILDebugInfoExpression.cpp b/lib/SIL/IR/SILDebugInfoExpression.cpp index cfea4a24a1fc4..666ad292d57b6 100644 --- a/lib/SIL/IR/SILDebugInfoExpression.cpp +++ b/lib/SIL/IR/SILDebugInfoExpression.cpp @@ -12,7 +12,7 @@ /// /// \file /// This file contains the table used by SILDIExprInfo to map from -/// SILDIExprOperator to suppliment information like the operator string. +/// SILDIExprOperator to supplement information like the operator string. /// //===----------------------------------------------------------------------===// From b435e8a22021f9e92c2b062c479f41e5a7723b6d Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:51:26 -0400 Subject: [PATCH 73/87] spelling: syntax Signed-off-by: Josh Soref --- SwiftCompilerSources/Sources/SIL/Effects.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SwiftCompilerSources/Sources/SIL/Effects.swift b/SwiftCompilerSources/Sources/SIL/Effects.swift index 24e367653fc93..08894f6dd5744 100644 --- a/SwiftCompilerSources/Sources/SIL/Effects.swift +++ b/SwiftCompilerSources/Sources/SIL/Effects.swift @@ -93,7 +93,7 @@ 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 /// @@ -101,7 +101,7 @@ public struct ArgumentEffect : CustomStringConvertible, CustomReflectable { /// 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. /// From f20f05135e47be91f379ebfba2c6543441f7d3fe Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 17:20:41 -0400 Subject: [PATCH 74/87] spelling: the Signed-off-by: Josh Soref --- include/swift/SIL/SILInstruction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILInstruction.h b/include/swift/SIL/SILInstruction.h index ff1a743ee5503..4d19ebe49bbea 100644 --- a/include/swift/SIL/SILInstruction.h +++ b/include/swift/SIL/SILInstruction.h @@ -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; }; From 5a09230e3f515bf8bf507f65f8f0a51eab2c416b Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:51:52 -0400 Subject: [PATCH 75/87] spelling: there Signed-off-by: Josh Soref --- lib/SIL/IR/SILConstants.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/SILConstants.cpp b/lib/SIL/IR/SILConstants.cpp index b98cb20c1618e..a16a62864ae62 100644 --- a/lib/SIL/IR/SILConstants.cpp +++ b/lib/SIL/IR/SILConstants.cpp @@ -378,7 +378,7 @@ unsigned SymbolicValue::getIntegerValueBitWidth() const { // Returns a SymbolicValue representing a UTF-8 encoded string. SymbolicValue SymbolicValue::getString(StringRef string, SymbolicValueAllocator &allocator) { - // TODO: Could have an inline representation for strings if thre was demand, + // TODO: Could have an inline representation for strings if there was demand, // just store a char[8] as the storage. auto *resultPtr = allocator.allocate(string.size()); From 92dd4e9b75a9c46bd55dac933b6807e6b1505c60 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:51:57 -0400 Subject: [PATCH 76/87] spelling: these Signed-off-by: Josh Soref --- lib/SIL/IR/SILFunctionType.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/SILFunctionType.cpp b/lib/SIL/IR/SILFunctionType.cpp index b3cce380061b5..eda48adabad44 100644 --- a/lib/SIL/IR/SILFunctionType.cpp +++ b/lib/SIL/IR/SILFunctionType.cpp @@ -399,7 +399,7 @@ static CanGenericSignature buildDifferentiableGenericSignature(CanGenericSignatu // The GSB used to drop requirements which reference non-existent // generic parameters, whereas the RequirementMachine asserts now. - // Filter thes requirements out explicitly to preserve the old + // Filter these requirements out explicitly to preserve the old // behavior. if (std::find_if(genericParams.begin(), genericParams.end(), [interfaceTy](CanGenericTypeParamType t) -> bool { From bcfbc49a928ad39462aa5c8cd8fa86468946d5dc Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:52:03 -0400 Subject: [PATCH 77/87] spelling: this Signed-off-by: Josh Soref --- include/swift/SIL/SILCloner.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILCloner.h b/include/swift/SIL/SILCloner.h index 22b51996e3d53..d687b00e2fa15 100644 --- a/include/swift/SIL/SILCloner.h +++ b/include/swift/SIL/SILCloner.h @@ -189,7 +189,7 @@ class SILCloner : protected SILInstructionVisitor { 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 From e6f1e7657553284723d769edeef3dd35c05580ec Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:52:08 -0400 Subject: [PATCH 78/87] spelling: though Signed-off-by: Josh Soref --- lib/SIL/Verifier/SILOwnershipVerifier.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SIL/Verifier/SILOwnershipVerifier.cpp b/lib/SIL/Verifier/SILOwnershipVerifier.cpp index 169df700192df..43615451c53ed 100644 --- a/lib/SIL/Verifier/SILOwnershipVerifier.cpp +++ b/lib/SIL/Verifier/SILOwnershipVerifier.cpp @@ -797,7 +797,7 @@ void SILValue::verifyOwnership(DeadEndBlocks *deadEndBlocks) const { // // NOTE: We purposely return if we do can not look up a module here to ensure // that if we run into something that we do not understand, we do not assert - // in user code even tohugh we aren't going to actually verify (the default + // in user code even though we aren't going to actually verify (the default // behavior when -sil-verify-all is disabled). auto *mod = Value->getModule(); if (!mod || !mod->getOptions().VerifyAll) @@ -841,7 +841,7 @@ void SILFunction::verifyOwnership(DeadEndBlocks *deadEndBlocks) const { // // NOTE: We purposely return if we do can not look up a module here to ensure // that if we run into something that we do not understand, we do not assert - // in user code even tohugh we aren't going to actually verify (the default + // in user code even though we aren't going to actually verify (the default // behavior when -sil-verify-all is disabled). auto *mod = &getModule(); if (!mod || !mod->getOptions().VerifyAll) From c9abda43f8c91b71023253324ae52741b1afdac2 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:52:12 -0400 Subject: [PATCH 79/87] spelling: through Signed-off-by: Josh Soref --- include/swift/SIL/SILInstruction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILInstruction.h b/include/swift/SIL/SILInstruction.h index 4d19ebe49bbea..ceb84181f0b18 100644 --- a/include/swift/SIL/SILInstruction.h +++ b/include/swift/SIL/SILInstruction.h @@ -9512,7 +9512,7 @@ SILFunction *ApplyInstBase::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(Callee)) From 4054dc4387606882775c87632bbccd40b0d14aad Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:52:45 -0400 Subject: [PATCH 80/87] spelling: transitively Signed-off-by: Josh Soref --- include/swift/SIL/OwnershipUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/OwnershipUtils.h b/include/swift/SIL/OwnershipUtils.h index 2841073740d31..22c22363d59c2 100644 --- a/include/swift/SIL/OwnershipUtils.h +++ b/include/swift/SIL/OwnershipUtils.h @@ -93,7 +93,7 @@ inline bool isForwardingConsume(SILValue value) { /// 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. /// From f30c8302b7b9ce2cf484b2570a4c69e39bbaa381 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:52:56 -0400 Subject: [PATCH 81/87] spelling: transpose Signed-off-by: Josh Soref --- include/swift/SIL/SILInstruction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILInstruction.h b/include/swift/SIL/SILInstruction.h index ceb84181f0b18..e123e0e5530f6 100644 --- a/include/swift/SIL/SILInstruction.h +++ b/include/swift/SIL/SILInstruction.h @@ -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< From 560e9c924cd52e7e3cc96637936c27f496c72542 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:53:05 -0400 Subject: [PATCH 82/87] spelling: trivial Signed-off-by: Josh Soref --- lib/SIL/IR/SILFunctionBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/IR/SILFunctionBuilder.cpp b/lib/SIL/IR/SILFunctionBuilder.cpp index ae2b98a41f5c9..7456b5cf967ed 100644 --- a/lib/SIL/IR/SILFunctionBuilder.cpp +++ b/lib/SIL/IR/SILFunctionBuilder.cpp @@ -322,7 +322,7 @@ SILFunction *SILFunctionBuilder::getOrCreateFunction( F->setSpecialPurpose(SILFunction::Purpose::LazyPropertyGetter); // Lazy property getters should not get inlined because they are usually - // non-tivial functions (otherwise the user would not implement it as + // non-trivial functions (otherwise the user would not implement it as // lazy property). Inlining such getters would most likely not benefit // other optimizations because the top-level switch_enum cannot be // constant folded in most cases. From 230af5971faa219e55c7b13254cadd04fcbabd3d Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:55:14 -0400 Subject: [PATCH 83/87] spelling: value Signed-off-by: Josh Soref --- lib/SIL/IR/OperandOwnership.cpp | 2 +- lib/SIL/Utils/InstructionUtils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SIL/IR/OperandOwnership.cpp b/lib/SIL/IR/OperandOwnership.cpp index 9e746fd21398b..f9c8ee457d324 100644 --- a/lib/SIL/IR/OperandOwnership.cpp +++ b/lib/SIL/IR/OperandOwnership.cpp @@ -271,7 +271,7 @@ OPERAND_OWNERSHIP(InteriorPointer, OpenExistentialBox) OPERAND_OWNERSHIP(InteriorPointer, HopToExecutor) OPERAND_OWNERSHIP(InteriorPointer, ExtractExecutor) -// Instructions that propagate a value value within a borrow scope. +// Instructions that propagate a value within a borrow scope. OPERAND_OWNERSHIP(ForwardingBorrow, TupleExtract) OPERAND_OWNERSHIP(ForwardingBorrow, StructExtract) OPERAND_OWNERSHIP(ForwardingBorrow, DifferentiableFunctionExtract) diff --git a/lib/SIL/Utils/InstructionUtils.cpp b/lib/SIL/Utils/InstructionUtils.cpp index ccae0acf67980..35b90d1b62ac2 100644 --- a/lib/SIL/Utils/InstructionUtils.cpp +++ b/lib/SIL/Utils/InstructionUtils.cpp @@ -484,7 +484,7 @@ RuntimeEffect swift::getRuntimeEffect(SILInstruction *inst, SILType &impactType) return RuntimeEffect::NoEffect; case SILInstructionKind::DebugValueInst: - // Ignore runtime calls of debug_vlaue + // Ignore runtime calls of debug_value return RuntimeEffect::NoEffect; case SILInstructionKind::GetAsyncContinuationInst: From 1838ae5482199414d26b43163f37babe93b043c9 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:55:22 -0400 Subject: [PATCH 84/87] spelling: verification Signed-off-by: Josh Soref --- lib/SIL/Parser/ParseSIL.cpp | 6 +++--- lib/SIL/Verifier/SILVerifier.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/SIL/Parser/ParseSIL.cpp b/lib/SIL/Parser/ParseSIL.cpp index 0396343828c55..74b97ae5e3e91 100644 --- a/lib/SIL/Parser/ParseSIL.cpp +++ b/lib/SIL/Parser/ParseSIL.cpp @@ -3277,14 +3277,14 @@ bool SILParser::parseSpecificSILInstruction(SILBuilder &B, break; } case SILInstructionKind::IsEscapingClosureInst: { - bool IsObjcVerifcationType = false; - if (parseSILOptional(IsObjcVerifcationType, *this, "objc")) + bool IsObjcVerificationType = false; + if (parseSILOptional(IsObjcVerificationType, *this, "objc")) return true; if (parseTypedValueRef(Val, B) || parseSILDebugLocation(InstLoc, B)) return true; ResultVal = B.createIsEscapingClosure( InstLoc, Val, - IsObjcVerifcationType ? IsEscapingClosureInst::ObjCEscaping + IsObjcVerificationType ? IsEscapingClosureInst::ObjCEscaping : IsEscapingClosureInst::WithoutActuallyEscaping); break; } diff --git a/lib/SIL/Verifier/SILVerifier.cpp b/lib/SIL/Verifier/SILVerifier.cpp index 73e16f4430f3f..07ea80e25a3ed 100644 --- a/lib/SIL/Verifier/SILVerifier.cpp +++ b/lib/SIL/Verifier/SILVerifier.cpp @@ -5108,7 +5108,7 @@ class SILVerifier : public SILVerifierBase { require(IEC->getVerificationType() == IsEscapingClosureInst::ObjCEscaping || IEC->getVerificationType() == IsEscapingClosureInst::WithoutActuallyEscaping, - "unknown verfication type"); + "unknown verification type"); } void checkDifferentiableFunctionInst(DifferentiableFunctionInst *dfi) { From a7d6bb1419307441414d0e5cd73112a22ebaacd8 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:55:35 -0400 Subject: [PATCH 85/87] spelling: visibility Signed-off-by: Josh Soref --- include/swift/SIL/SILModule.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/SILModule.h b/include/swift/SIL/SILModule.h index 1e319ccd7f277..18fca6f32a423 100644 --- a/include/swift/SIL/SILModule.h +++ b/include/swift/SIL/SILModule.h @@ -684,7 +684,7 @@ class SILModule { // This is currently limited to VarDecl because the visibility of global // variables and class properties is straightforward, while the visibility of - // class methods (ValueDecls) depends on the subclass scope. "Visiblity" has + // class methods (ValueDecls) depends on the subclass scope. "Visibility" has // a different meaning when vtable layout is at stake. bool isVisibleExternally(const VarDecl *decl) { return isPossiblyUsedExternally(getDeclSILLinkage(decl), isWholeModule()); From 94390c718c872f2229ae83c84debc66530f02dca Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:55:45 -0400 Subject: [PATCH 86/87] spelling: weird Signed-off-by: Josh Soref --- lib/SIL/Verifier/MemoryLifetimeVerifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp b/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp index a2b174db4b52c..b0abd312f8753 100644 --- a/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp +++ b/lib/SIL/Verifier/MemoryLifetimeVerifier.cpp @@ -304,7 +304,7 @@ void MemoryLifetimeVerifier::initDataflow(BitDataflow &dataFlow) { } bs.data.exitSet.set(); - // Anything weired can happen in unreachable blocks. So just ignore them. + // Anything weird can happen in unreachable blocks. So just ignore them. // Note: while solving the dataflow, unreachable blocks are implicitly // ignored, because their entry/exit sets are all-ones and their gen/kill // sets are all-zeroes. From 658043041851608055a6cf5d26c58a94c6e81566 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:55:55 -0400 Subject: [PATCH 87/87] spelling: whole Signed-off-by: Josh Soref --- include/swift/SIL/DynamicCasts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SIL/DynamicCasts.h b/include/swift/SIL/DynamicCasts.h index 9483ff42bbe74..9693a94951d8e 100644 --- a/include/swift/SIL/DynamicCasts.h +++ b/include/swift/SIL/DynamicCasts.h @@ -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);