7 #ifndef JLM_RVSDG_THETA_HPP
8 #define JLM_RVSDG_THETA_HPP
25 [[nodiscard]] std::
string
29 copy() const override;
70 GetOperation() const noexcept override;
87 auto result = subregion()->result(0);
88 JLM_ASSERT(is<const ControlType>(result->Type()));
95 auto node = TryGetOwnerNode<Node>(*predicate()->origin());
97 predicate()->divert_to(p);
98 if (node && node->IsDead())
139 RemoveLoopVars(std::vector<LoopVar> loopVars);
159 [[nodiscard]] LoopVar
177 [[nodiscard]] LoopVar
195 [[nodiscard]] LoopVar
213 [[nodiscard]] LoopVar
222 [[nodiscard]] std::vector<LoopVar>
229 return loopVar.post->origin() == loopVar.pre;
Represents the result of a region.
Represent acyclic RVSDG subgraphs.
rvsdg::Region * subregion(size_t index) const noexcept
RegionResult * predicate() const noexcept
rvsdg::Region * subregion() const noexcept
void set_predicate(jlm::rvsdg::Output *p)
~ThetaNode() noexcept override
std::unique_ptr< Operation > copy() const override
~ThetaOperation() noexcept override
std::string debug_string() const override
static bool ThetaLoopVarIsInvariant(const ThetaNode::LoopVar &loopVar) noexcept
static void remove(Node *node)
Description of a loop-carried variable.
rvsdg::Output * pre
Variable before iteration (input argument to subregion).
rvsdg::Output * output
Variable at loop exit (output of theta).
rvsdg::Input * input
Variable at loop entry (input to theta).
rvsdg::Input * post
Variable after iteration (output result from subregion).