Skip to content

Commit 13b7f45

Browse files
committed
EscapeAnalysis: remove unused pointsToEnd utility, for now.
1 parent cb1e787 commit 13b7f45

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

include/swift/SILOptimizer/Analysis/EscapeAnalysis.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -750,16 +750,6 @@ class EscapeAnalysis : public BottomUpIPAnalysis {
750750
template <typename CGNodeVisitor>
751751
bool forwardTraverseDefer(CGNode *startNode, CGNodeVisitor &&visitor);
752752

753-
/// Follow transitive pointsTo edges from \p startNode. Return true if \p
754-
/// visitor returns true for all visited nodes.
755-
template <typename CGNodeVisitor>
756-
bool forwardTraversePointsToEdges(CGNode *startNode,
757-
CGNodeVisitor &&visitor);
758-
759-
// Returns the last content node in the chain of pointsTo edges pointed to
760-
// by this node.
761-
CGNode *getPointsToEnd(CGNode *node);
762-
763753
/// Return true if \p pointer may indirectly point to \pointee via pointers
764754
/// and object references.
765755
bool mayReach(CGNode *pointer, CGNode *pointee);

lib/SILOptimizer/Analysis/EscapeAnalysis.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -885,41 +885,6 @@ bool EscapeAnalysis::ConnectionGraph::forwardTraverseDefer(
885885
return true;
886886
}
887887

888-
// Follow transitive pointsTo edges from \p startNode.
889-
// This path may not contain cycles.
890-
template <typename CGNodeVisitor>
891-
bool EscapeAnalysis::ConnectionGraph::forwardTraversePointsToEdges(
892-
CGNode *startNode, CGNodeVisitor &&visitor) {
893-
CGNodeWorklist visitedNodes(this);
894-
CGNode *pointer = startNode;
895-
while ((pointer = pointer->getPointsToEdge())) {
896-
if (!visitedNodes.tryPush(pointer))
897-
return true;
898-
899-
if (!visitor(pointer)) {
900-
return false;
901-
}
902-
}
903-
return true;
904-
}
905-
906-
// Returns the last content node in the chain of pointsTo edges pointed to by
907-
// this node.
908-
//
909-
// If this node has no content, return the node itself. If has content or is
910-
// already a content follow the chain of pointsTo edges and return the last
911-
// content node in the chain.
912-
CGNode *EscapeAnalysis::ConnectionGraph::getPointsToEnd(CGNode *node) {
913-
CGNode *content = node->isContent() ? node : node->getContentNodeOrNull();
914-
if (!content)
915-
return node;
916-
forwardTraversePointsToEdges(content, [&](CGNode *pointsTo) {
917-
content = pointsTo;
918-
return true;
919-
});
920-
return content;
921-
}
922-
923888
bool EscapeAnalysis::ConnectionGraph::mayReach(CGNode *pointer,
924889
CGNode *pointee) {
925890
if (pointer == pointee)

0 commit comments

Comments
 (0)