7 #ifndef JLM_RVSDG_UNARY_HPP
8 #define JLM_RVSDG_UNARY_HPP
31 std::shared_ptr<const jlm::rvsdg::Type> operand,
32 std::shared_ptr<const jlm::rvsdg::Type>
result)
67 std::optional<std::vector<rvsdg::Output *>>
70 const std::vector<rvsdg::Output *> &
operands);
const std::shared_ptr< const rvsdg::Type > & result(size_t index) const noexcept
~UnaryOperation() noexcept override
virtual jlm::rvsdg::Output * reduce_operand(unop_reduction_path_t path, jlm::rvsdg::Output *arg) const =0
UnaryOperation(std::shared_ptr< const jlm::rvsdg::Type > operand, std::shared_ptr< const jlm::rvsdg::Type > result)
virtual unop_reduction_path_t can_reduce_operand(const jlm::rvsdg::Output *arg) const noexcept=0
size_t unop_reduction_path_t
static const unop_reduction_path_t unop_reduction_inverse
static const unop_reduction_path_t unop_reduction_idempotent
static const unop_reduction_path_t unop_reduction_constant
static const unop_reduction_path_t unop_reduction_narrow
std::optional< std::vector< rvsdg::Output * > > NormalizeUnaryOperation(const UnaryOperation &operation, const std::vector< rvsdg::Output * > &operands)
Applies the reductions implemented in the unary operations reduction functions.
static std::vector< jlm::rvsdg::Output * > operands(const Node *node)
static const unop_reduction_path_t unop_reduction_none
static const unop_reduction_path_t unop_reduction_distribute