Skip to content

Commit 1af49ec

Browse files
committed
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.
1 parent 4d65c34 commit 1af49ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/SILOptimizer/Analysis/EscapeAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ class EscapeAnalysis : public BottomUpIPAnalysis {
449449

450450
/// Sets the outgoing points-to edge. The \p To node must be a Content node.
451451
void setPointsToEdge(CGNode *To) {
452-
assert(!To->mergeTo);
452+
assert(!To->isMerged);
453453
assert(To->Type == NodeType::Content &&
454454
"Wrong node type for points-to edge");
455455
pointsToIsEdge = true;

0 commit comments

Comments
 (0)