6#ifndef JLM_RVSDG_TESTOPERATIONS_HPP
7#define JLM_RVSDG_TESTOPERATIONS_HPP
33 return "NullaryOperation";
39 return std::make_unique<TestNullaryOperation>(this->
result(0));
61 copy()
const override;
174 copy()
const override;
176 static std::unique_ptr<TestOperation>
179 std::vector<std::shared_ptr<const Type>>
resultTypes)
187 const std::vector<Output *> &
operands,
188 std::vector<std::shared_ptr<const Type>>
resultTypes)
191 for (
const auto & operand :
operands)
201 const std::vector<rvsdg::Output *> &
operands,
202 std::vector<std::shared_ptr<const Type>>
resultTypes)
Nullary operator (operator taking no formal arguments)
Represent acyclic RVSDG subgraphs.
const std::shared_ptr< const rvsdg::Type > & result(size_t index) const noexcept
binop_reduction_path_t can_reduce_operand_pair(const Output *op1, const Output *op2) const noexcept override
static Node * create(const std::shared_ptr< const Type > &operandType, std::shared_ptr< const Type > resultType, Output *op1, Output *op2)
~TestBinaryOperation() noexcept override
std::unique_ptr< Operation > copy() const override
Output * reduce_operand_pair(binop_reduction_path_t path, Output *op1, Output *op2) const override
bool operator==(const Operation &other) const noexcept override
enum BinaryOperation::flags flags_
enum BinaryOperation::flags flags() const noexcept override
std::string debug_string() const override
static Output * create_normalized(const std::shared_ptr< const Type > operandType, std::shared_ptr< const Type > resultType, Output *op1, Output *op2)
bool operator==(const Operation &other) const noexcept override
TestNullaryOperation(const std::shared_ptr< const Type > &resultType)
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
static SimpleNode * createNode(Region *region, const std::vector< Output * > &operands, std::vector< std::shared_ptr< const Type > > resultTypes)
std::string debug_string() const override
std::unique_ptr< Operation > copy() const override
~TestOperation() noexcept override
TestOperation(const TestOperation &)=default
bool operator==(const Operation &other) const noexcept override
static std::unique_ptr< TestOperation > create(std::vector< std::shared_ptr< const Type > > operandTypes, std::vector< std::shared_ptr< const Type > > resultTypes)
static SimpleNode * createNode(Region *region, std::vector< std::shared_ptr< const Type > > operandTypes, const std::vector< rvsdg::Output * > &operands, std::vector< std::shared_ptr< const Type > > resultTypes)
~TestUnaryOperation() noexcept override
bool operator==(const Operation &other) const noexcept override
static Output * create_normalized(std::shared_ptr< const Type > operandType, Output *operand, std::shared_ptr< const Type > resultType)
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
static Node * create(Region *, std::shared_ptr< const Type > operandType, Output *operand, std::shared_ptr< const Type > resultType)
static std::vector< jlm::rvsdg::Output * > operands(const Node *node)
size_t binop_reduction_path_t
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.