17 return op && op->
argument(0) == argument(0) && op->result(0) == result(0);
35 return "TestUnaryOperation";
38 std::unique_ptr<Operation>
41 return std::make_unique<TestUnaryOperation>(*
this);
50 return op && op->
argument(0) == argument(0) && op->result(0) == result(0);
74 return "TestBinaryOperation";
77 std::unique_ptr<Operation>
80 return std::make_unique<TestBinaryOperation>(*
this);
88 const auto testOperation =
dynamic_cast<const TestOperation *
>(&other);
92 if (narguments() != testOperation->narguments() || nresults() != testOperation->nresults())
95 for (
size_t n = 0; n < narguments(); n++)
97 if (argument(n) != testOperation->argument(n))
101 for (
size_t n = 0; n < nresults(); n++)
103 if (result(n) != testOperation->result(n))
113 return "TestOperation";
116 std::unique_ptr<Operation>
119 return std::make_unique<TestOperation>(*
this);
const std::shared_ptr< const rvsdg::Type > & argument(size_t index) const noexcept
binop_reduction_path_t can_reduce_operand_pair(const Output *op1, const Output *op2) const noexcept override
~TestBinaryOperation() noexcept override
std::unique_ptr< Operation > copy() const override
enum BinaryOperation::flags flags_
Output * reduce_operand_pair(unop_reduction_path_t path, Output *op1, Output *op2) const override
enum BinaryOperation::flags flags() const noexcept override
std::string debug_string() const override
std::string debug_string() const override
std::unique_ptr< Operation > copy() const override
~TestOperation() noexcept override
~TestUnaryOperation() noexcept override
std::unique_ptr< Operation > copy() const override
Output * reduce_operand(unop_reduction_path_t path, Output *operand) const override
std::string debug_string() const override
unop_reduction_path_t can_reduce_operand(const Output *operand) const noexcept override
size_t unop_reduction_path_t
size_t binop_reduction_path_t
static const unop_reduction_path_t unop_reduction_none
static const binop_reduction_path_t binop_reduction_none