From 1af49ecb996e66aa0b7de7395ee073973a13ed7c Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Tue, 28 Jan 2020 22:54:08 -0800 Subject: [PATCH] Fix an EscapeAnalysis assert to handle recent changes. setPointsToEdge should assert that its target isn't already merged, but now that we batch up multiple merge requests, it's fine to allow the target to be scheduled-for-merge. Many assertions have been recently added and tightened in order to "discover" unexpected cases. There's nothing incorrect about how these cases were handled, but they lack unit tests. In this case I still haven't been able to reduce a test case. I'm continuing to work on it, but don't want to further delay the fix. --- include/swift/SILOptimizer/Analysis/EscapeAnalysis.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/SILOptimizer/Analysis/EscapeAnalysis.h b/include/swift/SILOptimizer/Analysis/EscapeAnalysis.h index c1d405c4d7f42..2d56b97d85695 100644 --- a/include/swift/SILOptimizer/Analysis/EscapeAnalysis.h +++ b/include/swift/SILOptimizer/Analysis/EscapeAnalysis.h @@ -449,7 +449,7 @@ class EscapeAnalysis : public BottomUpIPAnalysis { /// Sets the outgoing points-to edge. The \p To node must be a Content node. void setPointsToEdge(CGNode *To) { - assert(!To->mergeTo); + assert(!To->isMerged); assert(To->Type == NodeType::Content && "Wrong node type for points-to edge"); pointsToIsEdge = true;