File tree Expand file tree Collapse file tree 2 files changed +0
-45
lines changed
include/swift/SILOptimizer/Analysis
lib/SILOptimizer/Analysis Expand file tree Collapse file tree 2 files changed +0
-45
lines changed Original file line number Diff line number Diff line change @@ -750,16 +750,6 @@ class EscapeAnalysis : public BottomUpIPAnalysis {
750
750
template <typename CGNodeVisitor>
751
751
bool forwardTraverseDefer (CGNode *startNode, CGNodeVisitor &&visitor);
752
752
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
-
763
753
// / Return true if \p pointer may indirectly point to \pointee via pointers
764
754
// / and object references.
765
755
bool mayReach (CGNode *pointer, CGNode *pointee);
Original file line number Diff line number Diff line change @@ -885,41 +885,6 @@ bool EscapeAnalysis::ConnectionGraph::forwardTraverseDefer(
885
885
return true ;
886
886
}
887
887
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
-
923
888
bool EscapeAnalysis::ConnectionGraph::mayReach (CGNode *pointer,
924
889
CGNode *pointee) {
925
890
if (pointer == pointee)
You can’t perform that action at this time.
0 commit comments