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:
Andrew Trick
2019-12-16 16:12:17 -08:00
parent 7fb4e21bc0
commit 17ab0ad5b5

View File

@@ -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, ...) \