Jlm
Trace.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_IR_TRACE_HPP
7 #define JLM_LLVM_IR_TRACE_HPP
8 
9 #include <jlm/rvsdg/node.hpp>
10 #include <jlm/rvsdg/Trace.hpp>
11 
12 #include <optional>
13 
14 namespace jlm::llvm
15 {
16 
18 {
19 public:
21 
22 protected:
23  [[nodiscard]] rvsdg::Output &
24  traceStep(rvsdg::Output & output, bool mayLeaveRegion) override;
25 };
26 
36 traceOutput(rvsdg::Output & output);
37 
38 inline const rvsdg::Output &
39 traceOutput(const rvsdg::Output & output)
40 {
41  return llvm::traceOutput(const_cast<rvsdg::Output &>(output));
42 }
43 
51 std::optional<int64_t>
53 
54 }
55 
56 #endif // JLM_LLVM_IR_TRACE_HPP
rvsdg::Output & traceStep(rvsdg::Output &output, bool mayLeaveRegion) override
Definition: Trace.cpp:19
Global memory state passed between functions.
rvsdg::Output & traceOutput(rvsdg::Output &output)
Definition: Trace.cpp:39
std::optional< int64_t > tryGetConstantSignedInteger(const rvsdg::Output &output)
Definition: Trace.cpp:46