Skip to content

Commit 9931aab

Browse files
authored
Merge pull request #28103 from atrick/cleanup-escapes
EscapeAnalysis cleanup and add utilities [nearly NFC]
2 parents 77393e3 + 13b7f45 commit 9931aab

File tree

11 files changed

+701
-360
lines changed

11 files changed

+701
-360
lines changed

include/swift/SIL/SILArgumentConvention.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ struct SILArgumentConvention {
129129
llvm_unreachable("covered switch isn't covered?!");
130130
}
131131

132-
/// Returns true if \p Value is a not-aliasing indirect parameter.
133-
bool isNotAliasedIndirectParameter() {
132+
/// Returns true if \p Value is a non-aliasing indirect parameter.
133+
bool isExclusiveIndirectParameter() {
134134
switch (Value) {
135135
case SILArgumentConvention::Indirect_In:
136136
case SILArgumentConvention::Indirect_In_Constant:

include/swift/SIL/SILType.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,19 +281,22 @@ class SILType {
281281
/// address-only. This is the opposite of isLoadable.
282282
bool isAddressOnly(const SILFunction &F) const;
283283

284-
/// True if the type, or the referenced type of an address type, is trivial,
285-
/// meaning it is loadable and can be trivially copied, moved or detroyed.
284+
/// True if the underlying AST type is trivial, meaning it is loadable and can
285+
/// be trivially copied, moved or detroyed. Returns false for address types
286+
/// even though they are technically trivial.
286287
bool isTrivial(const SILFunction &F) const;
287288

288289
/// True if the type, or the referenced type of an address type, is known to
289-
/// be a scalar reference-counted type.
290+
/// be a scalar reference-counted type such as a class, box, or thick function
291+
/// type. Returns false for non-trivial aggregates.
290292
bool isReferenceCounted(SILModule &M) const;
291293

292294
/// Returns true if the referenced type is a function type that never
293295
/// returns.
294296
bool isNoReturnFunction(SILModule &M) const;
295297

296-
/// Returns true if the referenced type has reference semantics.
298+
/// Returns true if the referenced AST type has reference semantics, even if
299+
/// the lowered SIL type is known to be trivial.
297300
bool hasReferenceSemantics() const {
298301
return getASTType().hasReferenceSemantics();
299302
}

0 commit comments

Comments
 (0)