Skip to content

Revert "Merge pull request #42242 from eeckstein/escapeinfo" #42562

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 1 commit into from
Apr 22, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,4 @@ struct AliasAnalysis {
return false
}
}

/// Returns the correct path for address-alias functions.
static func getPtrOrAddressPath(for value: Value) -> EscapeInfo.Path {
let ty = value.type
if ty.isAddress {
// This is the regular case: the path selects any sub-fields of an address.
return EscapeInfo.Path(.anyValueFields)
}
// Some optimizations use the address-alias APIs with non-address SIL values.
// TODO: this is non-intuitive and we should eliminate those API uses.
if ty.isClass {
// If the value is a (non-address) reference it means: all addresses within the class instance.
return EscapeInfo.Path(.anyValueFields).push(.anyClassField)
}
// Any other non-address value means: all addresses of any referenced class instances within the value.
return EscapeInfo.Path(.anyValueFields).push(.anyClassField).push(.anyValueFields)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

swift_compiler_sources(Optimizer
AssumeSingleThreaded.swift
ComputeEffects.swift
EscapeInfoDumper.swift
SILPrinter.swift
MergeCondFails.swift
RangeDumper.swift
Expand Down

This file was deleted.

Loading