36 if (
no->node() == node)
101 rmap[
j].insert(
ev.branchArgument[
j],
oex.branchResult[
j]->origin());
109 rmap[
j].insert(
ev.branchArgument[
j],
oev.branchArgument[
j]);
121 std::vector<jlm::rvsdg::Output *>
operands;
122 for (
size_t j = 0;
j <
ex.branchResult.size();
j++)
127 ex.output->divert_users(
oex);
void Run(rvsdg::RvsdgModule &rvsdgModule, util::StatisticsCollector &statisticsCollector) override
Perform RVSDG transformation.
~GammaMerge() noexcept override
Conditional operator / pattern matching.
std::variant< MatchVar, EntryVar > MapInput(const rvsdg::Input &input) const
Maps gamma input to its role (match variable or entry variable).
EntryVar AddEntryVar(rvsdg::Output *origin)
Routes a variable into the gamma branches.
std::vector< ExitVar > GetExitVars() const
Gets all exit variables for this gamma.
std::vector< EntryVar > GetEntryVars() const
Gets all entry variables for this gamma.
rvsdg::Input * predicate() const noexcept
Node * node() const noexcept
Represents the argument of a region.
Represent acyclic RVSDG subgraphs.
void copy(Region *target, SubstitutionMap &smap) const
Copy a region with substitutions.
rvsdg::Region * subregion(size_t index) const noexcept
size_t nsubregions() const noexcept
bool merge_gamma(rvsdg::GammaNode *gamma)
bool is_output_of(jlm::rvsdg::Output *output, rvsdg::Node *node)
rvsdg::GammaNode::EntryVar get_entryvar(jlm::rvsdg::Output *origin, rvsdg::GammaNode *gamma)
bool depends_on(jlm::rvsdg::Output *output, rvsdg::Node *node)
static void remove(Node *node)
static std::vector< jlm::rvsdg::Output * > operands(const Node *node)
size_t ninputs(const rvsdg::Region *region) noexcept
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
detail::TopDownTraverserGeneric< false > TopDownTraverser
Traverser for visiting every node in a region in a top down order.
A variable routed into all gamma regions.