Jlm
Loading...
Searching...
No Matches
RvsdgModule.hpp
Go to the documentation of this file.
1/*
2 * Copyright 2024 Nico Reißmann <nico.reissmann@gmail.com>
3 * See COPYING for terms of redistribution.
4 */
5
6#ifndef JLM_RVSDG_RVSDGMODULE_HPP
7#define JLM_RVSDG_RVSDGMODULE_HPP
8
9#include <jlm/rvsdg/graph.hpp>
10#include <jlm/util/file.hpp>
11#include <optional>
12
13namespace jlm::rvsdg
14{
15
20{
21public:
23
25
30
31 RvsdgModule(util::FilePath sourceFilePath, std::unique_ptr<Graph> rvsdg)
32 : rvsdg_(std::move(rvsdg)),
34 {}
35
36 RvsdgModule(const RvsdgModule &) = delete;
37
39
41 operator=(const RvsdgModule &) = delete;
42
44 operator=(RvsdgModule &&) = delete;
45
49 [[nodiscard]] virtual std::unique_ptr<RvsdgModule>
50 copy() const;
51
56 Graph &
58 {
59 return *rvsdg_;
60 }
61
66 [[nodiscard]] const Graph &
68 {
69 return *rvsdg_;
70 }
71
72 [[nodiscard]] const std::optional<util::FilePath> &
77
78private:
79 std::unique_ptr<Graph> rvsdg_{};
80 std::optional<util::FilePath> SourceFilePath_{};
81};
82
83}
84
85#endif // JLM_RVSDG_RVSDGMODULE_HPP
RvsdgModule(util::FilePath sourceFilePath, std::unique_ptr< Graph > rvsdg)
std::optional< util::FilePath > SourceFilePath_
std::unique_ptr< Graph > rvsdg_
RvsdgModule & operator=(RvsdgModule &&)=delete
const std::optional< util::FilePath > & SourceFilePath() const noexcept
RvsdgModule(RvsdgModule &&)=delete
virtual std::unique_ptr< RvsdgModule > copy() const
const Graph & Rvsdg() const noexcept
RvsdgModule(const RvsdgModule &)=delete
RvsdgModule & operator=(const RvsdgModule &)=delete
Graph & Rvsdg() noexcept
virtual ~RvsdgModule() noexcept
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
Definition node.hpp:872