Skip to content

EscapeAnalysis cleanup and add utilities [nearly NFC] #28103

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/swift/SIL/SILArgumentConvention.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ struct SILArgumentConvention {
llvm_unreachable("covered switch isn't covered?!");
}

/// Returns true if \p Value is a not-aliasing indirect parameter.
bool isNotAliasedIndirectParameter() {
/// Returns true if \p Value is a non-aliasing indirect parameter.
bool isExclusiveIndirectParameter() {
switch (Value) {
case SILArgumentConvention::Indirect_In:
case SILArgumentConvention::Indirect_In_Constant:
Expand Down
11 changes: 7 additions & 4 deletions include/swift/SIL/SILType.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,19 +281,22 @@ class SILType {
/// address-only. This is the opposite of isLoadable.
bool isAddressOnly(const SILFunction &F) const;

/// True if the type, or the referenced type of an address type, is trivial,
/// meaning it is loadable and can be trivially copied, moved or detroyed.
/// 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
/// even though they are technically trivial.
bool isTrivial(const SILFunction &F) const;

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

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

/// Returns true if the referenced type has reference semantics.
/// Returns true if the referenced AST type has reference semantics, even if
/// the lowered SIL type is known to be trivial.
bool hasReferenceSemantics() const {
return getASTType().hasReferenceSemantics();
}
Expand Down
Loading