11 : pointsToGraph_(pointsToGraph)
19 return "PointsToGraphAA";
40 if (p1TargetsExternal && p2TargetsExternal)
50 if (p1SingleTarget.has_value() && p2SingleTarget.has_value()
60 const auto neededSize = std::max(s1, s2);
65 if (p1TargetsExternal)
68 std::swap(onlyExplicitTargetsNode, otherNode);
76 if (targetSize.has_value() && *targetSize < neededSize)
86 std::optional<PointsToGraph::NodeIndex>
93 std::optional<PointsToGraph::NodeIndex> singleTarget = std::nullopt;
99 if (targetSize.has_value() && *targetSize < size)
103 if (singleTarget.has_value())
106 singleTarget = target;
126 throw std::logic_error(
"Unknown node kind");
bool IsRepresentingSingleMemoryLocation(PointsToGraph::NodeIndex node) const
std::optional< PointsToGraph::NodeIndex > TryGetSingleTarget(PointsToGraph::NodeIndex node, size_t size) const
const PointsToGraph & pointsToGraph_
PointsToGraphAliasAnalysis(const PointsToGraph &pointsToGraph)
~PointsToGraphAliasAnalysis() noexcept override
AliasQueryResponse Query(const rvsdg::Output &p1, size_t s1, const rvsdg::Output &p2, size_t s2) override
std::optional< size_t > tryGetNodeSize(NodeIndex index) const noexcept
bool isTargeting(NodeIndex source, NodeIndex target) const
const util::HashSet< NodeIndex > & getExplicitTargets(NodeIndex index) const
NodeIndex getNodeForRegister(const rvsdg::Output &output) const
bool isTargetingAllExternallyAvailable(NodeIndex index) const
NodeKind getNodeKind(NodeIndex index) const
static std::string ToString(const std::vector< MemoryNodeId > &memoryNodeIds)