Jlm
Loading...
Searching...
No Matches
PointsToGraphAliasAnalysis.hpp
Go to the documentation of this file.
1/*
2 * Copyright 2025 HÃ¥vard Krogstie <krogstie.havard@gmail.com>
3 * See COPYING for terms of redistribution.
4 */
5
6#ifndef JLM_LLVM_OPT_ALIAS_ANALYSES_POINTSTOGRAPHALIASANALYSIS_HPP
7#define JLM_LLVM_OPT_ALIAS_ANALYSES_POINTSTOGRAPHALIASANALYSIS_HPP
8
11
12#include <string>
13
14namespace jlm::llvm::aa
15{
16
21{
22public:
23 explicit PointsToGraphAliasAnalysis(std::shared_ptr<const PointsToGraph> pointsToGraph);
24
25 ~PointsToGraphAliasAnalysis() noexcept override;
26
27 [[nodiscard]] std::string
28 ToString() const override;
29
31 Query(const rvsdg::Output & p1, size_t s1, const rvsdg::Output & p2, size_t s2) override;
32
33private:
43 [[nodiscard]] std::optional<PointsToGraph::NodeIndex>
44 TryGetSingleTarget(PointsToGraph::NodeIndex node, size_t size) const;
45
53 [[nodiscard]] bool
55
56 std::shared_ptr<const PointsToGraph> pointsToGraph_;
57};
58
59} // namespace jlm::llvm::aa
60
61#endif // JLM_LLVM_OPT_ALIAS_ANALYSES_POINTSTOGRAPHALIASANALYSIS_HPP
jlm::llvm::aa::PointsToGraph::NodeIndex NodeIndex
bool IsRepresentingSingleMemoryLocation(PointsToGraph::NodeIndex node) const
std::optional< PointsToGraph::NodeIndex > TryGetSingleTarget(PointsToGraph::NodeIndex node, size_t size) const
std::shared_ptr< const PointsToGraph > pointsToGraph_
~PointsToGraphAliasAnalysis() noexcept override
AliasQueryResponse Query(const rvsdg::Output &p1, size_t s1, const rvsdg::Output &p2, size_t s2) override