Jlm
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
jlm::rvsdg::BitCompareOperation Class Referenceabstract

#include <bitoperation-classes.hpp>

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

Public Member Functions

 ~BitCompareOperation () noexcept override
 
 BitCompareOperation (std::shared_ptr< const BitType > type) noexcept
 
binop_reduction_path_t can_reduce_operand_pair (const jlm::rvsdg::Output *arg1, const jlm::rvsdg::Output *arg2) const noexcept override
 
jlm::rvsdg::Outputreduce_operand_pair (binop_reduction_path_t path, jlm::rvsdg::Output *arg1, jlm::rvsdg::Output *arg2) const override
 
virtual compare_result reduce_constants (const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const =0
 
virtual std::unique_ptr< BitCompareOperationcreate (size_t nbits) const =0
 
const BitTypetype () const noexcept
 
- Public Member Functions inherited from jlm::rvsdg::BinaryOperation
 ~BinaryOperation () noexcept override
 
 BinaryOperation (const std::vector< std::shared_ptr< const jlm::rvsdg::Type > > operands, std::shared_ptr< const jlm::rvsdg::Type > result)
 
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
 

Static Public Member Functions

static std::optional< std::vector< Output * > > foldConstants (const BitCompareOperation &operation, const std::vector< Output * > &operands)
 

Additional Inherited Members

- Public Types inherited from jlm::rvsdg::BinaryOperation
enum class  flags { none = 0 , associative = 1 , commutative = 2 }
 

Detailed Description

Definition at line 112 of file bitoperation-classes.hpp.

Constructor & Destructor Documentation

◆ ~BitCompareOperation()

jlm::rvsdg::BitCompareOperation::~BitCompareOperation ( )
overridedefaultnoexcept

◆ BitCompareOperation()

jlm::rvsdg::BitCompareOperation::BitCompareOperation ( std::shared_ptr< const BitType type)
inlineexplicitnoexcept

Definition at line 117 of file bitoperation-classes.hpp.

Member Function Documentation

◆ can_reduce_operand_pair()

binop_reduction_path_t jlm::rvsdg::BitCompareOperation::can_reduce_operand_pair ( const jlm::rvsdg::Output arg1,
const jlm::rvsdg::Output arg2 
) const
overridevirtualnoexcept

Implements jlm::rvsdg::BinaryOperation.

Definition at line 111 of file bitoperation-classes.cpp.

◆ create()

virtual std::unique_ptr< BitCompareOperation > jlm::rvsdg::BitCompareOperation::create ( size_t  nbits) const
pure virtual

◆ foldConstants()

std::optional< std::vector< Output * > > jlm::rvsdg::BitCompareOperation::foldConstants ( const BitCompareOperation operation,
const std::vector< Output * > &  operands 
)
static

Performs constant folding by statically evaluating the two constant operands and replacing the operations result with the resulting constant.

Parameters
operationThe BitCompareOperation on which the transformation is performed.
operandsThe operands of the BitCompareOperation node.
Returns
If the normalization could be applied, then the result of the BitCompareOperation after the transformation. Otherwise, std::nullopt.

Definition at line 123 of file bitoperation-classes.cpp.

◆ reduce_constants()

virtual compare_result jlm::rvsdg::BitCompareOperation::reduce_constants ( const BitValueRepresentation arg1,
const BitValueRepresentation arg2 
) const
pure virtual

◆ reduce_operand_pair()

Output * jlm::rvsdg::BitCompareOperation::reduce_operand_pair ( binop_reduction_path_t  path,
jlm::rvsdg::Output arg1,
jlm::rvsdg::Output arg2 
) const
overridevirtual

Implements jlm::rvsdg::BinaryOperation.

Definition at line 117 of file bitoperation-classes.cpp.

◆ type()

const BitType & jlm::rvsdg::BitCompareOperation::type ( ) const
inlinenoexcept

Definition at line 139 of file bitoperation-classes.hpp.


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