mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
EscapeAnalysis: Do not create defer edges for block arguemnts.
That appears to have been a partial workaround for the real problem that usepoints need to be propagated across the entire defer web. This is now solved by considering use points on the reference node's content, not the reference node itself.
This commit is contained in:
@@ -826,15 +826,6 @@ void EscapeAnalysis::ConnectionGraph::computeUsePoints() {
|
||||
#endif
|
||||
// First scan the whole function and add relevant instructions as use-points.
|
||||
for (auto &BB : *F) {
|
||||
for (SILArgument *BBArg : BB.getArguments()) {
|
||||
/// In addition to releasing instructions (see below) we also add block
|
||||
/// arguments as use points. In case of loops, block arguments can
|
||||
/// "extend" the liferange of a reference in upward direction.
|
||||
if (CGNode *ArgNode = lookupNode(BBArg)) {
|
||||
addUsePoint(ArgNode, BBArg);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto &I : BB) {
|
||||
switch (I.getKind()) {
|
||||
#define ALWAYS_OR_SOMETIMES_LOADABLE_CHECKED_REF_STORAGE(Name, ...) \
|
||||
|
||||
Reference in New Issue
Block a user