36 auto tryP1RegisterNode =
pointsToGraph_->tryGetNodeForRegister(p1);
37 if (!tryP1RegisterNode)
40 auto tryP2RegisterNode =
pointsToGraph_->tryGetNodeForRegister(p2);
41 if (!tryP2RegisterNode)
44 const auto p1RegisterNode = *tryP1RegisterNode;
45 const auto p2RegisterNode = *tryP2RegisterNode;
48 const bool p1TargetsExternal =
pointsToGraph_->isTargetingAllExternallyAvailable(p1RegisterNode);
49 const bool p2TargetsExternal =
pointsToGraph_->isTargetingAllExternallyAvailable(p2RegisterNode);
50 if (p1TargetsExternal && p2TargetsExternal)
60 if (p1SingleTarget.has_value() && p2SingleTarget.has_value()
70 const auto neededSize = std::max(s1, s2);
75 if (p1TargetsExternal)
78 std::swap(onlyExplicitTargetsNode, otherNode);
81 for (
const auto target :
pointsToGraph_->getExplicitTargets(onlyExplicitTargetsNode).Items())
86 if (targetSize.has_value() && *targetSize < neededSize)
103 std::optional<PointsToGraph::NodeIndex> singleTarget = std::nullopt;
105 for (
const auto target :
pointsToGraph_->getExplicitTargets(node).Items())
109 if (targetSize.has_value() && *targetSize < size)
113 if (singleTarget.has_value())
116 singleTarget = target;