6#ifndef JLM_RVSDG_NODENORMALIZATION_HPP
7#define JLM_RVSDG_NODENORMALIZATION_HPP
23template<
class TOperation>
25 std::optional<std::vector<Output *>>(
const TOperation &,
const std::vector<Output *> &)>;
27template<
class TOperation>
28std::optional<std::vector<Output *>>
32 const std::vector<Output *> &
operands)
45template<
class TOperation>
49 auto operation = util::assertedCast<const TOperation>(&node.
GetOperation());
const SimpleOperation & GetOperation() const noexcept override
bool ReduceNode(const NodeNormalization< TOperation > &nodeNormalization, SimpleNode &node)
static void remove(Node *node)
static std::vector< jlm::rvsdg::Output * > operands(const Node *node)
std::optional< std::vector< Output * > > NormalizeSequence(const std::vector< NodeNormalization< TOperation > > &nodeNormalizations, const TOperation &operation, const std::vector< Output * > &operands)
static void divert_users(Node *node, const std::vector< Output * > &outputs)
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
std::function< std::optional< std::vector< Output * > >(const TOperation &, const std::vector< Output * > &)> NodeNormalization