Jlm
Public Types | Public Member Functions | List of all members
jlm::rvsdg::BinaryOperation Class Referenceabstract

#include <binary.hpp>

Inheritance diagram for jlm::rvsdg::BinaryOperation:
Inheritance graph
[legend]
Collaboration diagram for jlm::rvsdg::BinaryOperation:
Collaboration graph
[legend]

Public Types

enum class  flags { none = 0 , associative = 1 , commutative = 2 }
 

Public Member Functions

 ~BinaryOperation () noexcept override
 
 BinaryOperation (const std::vector< std::shared_ptr< const jlm::rvsdg::Type >> operands, std::shared_ptr< const jlm::rvsdg::Type > result)
 
virtual binop_reduction_path_t can_reduce_operand_pair (const jlm::rvsdg::Output *op1, const jlm::rvsdg::Output *op2) const noexcept=0
 
virtual jlm::rvsdg::Outputreduce_operand_pair (binop_reduction_path_t path, jlm::rvsdg::Output *op1, jlm::rvsdg::Output *op2) const =0
 
virtual BinaryOperation::flags flags () const noexcept
 
bool is_associative () const noexcept
 
bool is_commutative () const noexcept
 
- Public Member Functions inherited from jlm::rvsdg::SimpleOperation
 ~SimpleOperation () noexcept override
 
 SimpleOperation (std::vector< std::shared_ptr< const jlm::rvsdg::Type >> operands, std::vector< std::shared_ptr< const jlm::rvsdg::Type >> results)
 
size_t narguments () const noexcept
 
const std::shared_ptr< const rvsdg::Type > & argument (size_t index) const noexcept
 
size_t nresults () const noexcept
 
const std::shared_ptr< const rvsdg::Type > & result (size_t index) const noexcept
 
- Public Member Functions inherited from jlm::rvsdg::Operation
virtual ~Operation () noexcept
 
virtual bool operator== (const Operation &other) const noexcept=0
 
virtual std::string debug_string () const =0
 
virtual std::unique_ptr< Operationcopy () const =0
 
bool operator!= (const Operation &other) const noexcept
 

Detailed Description

Binary operation taking two arguments (with well-defined reduction for more operands if operator is associative).

Definition at line 25 of file binary.hpp.

Member Enumeration Documentation

◆ flags

Enumerator
none 
associative 
commutative 

Definition at line 28 of file binary.hpp.

Constructor & Destructor Documentation

◆ ~BinaryOperation()

jlm::rvsdg::BinaryOperation::~BinaryOperation ( )
overridedefaultnoexcept

◆ BinaryOperation()

jlm::rvsdg::BinaryOperation::BinaryOperation ( const std::vector< std::shared_ptr< const jlm::rvsdg::Type >>  operands,
std::shared_ptr< const jlm::rvsdg::Type result 
)
inline

Definition at line 37 of file binary.hpp.

Member Function Documentation

◆ can_reduce_operand_pair()

virtual binop_reduction_path_t jlm::rvsdg::BinaryOperation::can_reduce_operand_pair ( const jlm::rvsdg::Output op1,
const jlm::rvsdg::Output op2 
) const
pure virtualnoexcept

◆ flags()

◆ is_associative()

bool jlm::rvsdg::BinaryOperation::is_associative ( ) const
inlinenoexcept

Definition at line 192 of file binary.hpp.

◆ is_commutative()

bool jlm::rvsdg::BinaryOperation::is_commutative ( ) const
inlinenoexcept

Definition at line 198 of file binary.hpp.

◆ reduce_operand_pair()

virtual jlm::rvsdg::Output* jlm::rvsdg::BinaryOperation::reduce_operand_pair ( binop_reduction_path_t  path,
jlm::rvsdg::Output op1,
jlm::rvsdg::Output op2 
) const
pure virtual

The documentation for this class was generated from the following files: