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

#include <bitoperation-classes.hpp>

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

Public Member Functions

 ~BitUnaryOperation () noexcept override
 
 BitUnaryOperation (const std::shared_ptr< const BitType > &type) noexcept
 
const BitTypetype () const noexcept
 
virtual BitValueRepresentation reduce_constant (const BitValueRepresentation &arg) const =0
 
virtual std::unique_ptr< BitUnaryOperationcreate (size_t nbits) const =0
 
- Public Member Functions inherited from jlm::rvsdg::UnaryOperation
 ~UnaryOperation () noexcept override
 
 UnaryOperation (std::shared_ptr< const Type > operand, std::shared_ptr< const Type > result)
 
- 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 * > > foldConstant (const BitUnaryOperation &operation, const std::vector< Output * > &operands)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ~BitUnaryOperation()

jlm::rvsdg::BitUnaryOperation::~BitUnaryOperation ( )
overridedefaultnoexcept

◆ BitUnaryOperation()

jlm::rvsdg::BitUnaryOperation::BitUnaryOperation ( const std::shared_ptr< const BitType > &  type)
inlineexplicitnoexcept

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

Member Function Documentation

◆ create()

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

◆ foldConstant()

std::optional< std::vector< Output * > > jlm::rvsdg::BitUnaryOperation::foldConstant ( const BitUnaryOperation 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 BitUnaryOperation on which the transformation is performed.
operandsThe operands of the BitUnaryOperation node.
Returns
If the normalization could be applied, then the result of the BitUnaryOperation after the transformation. Otherwise, std::nullopt.

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

◆ reduce_constant()

virtual BitValueRepresentation jlm::rvsdg::BitUnaryOperation::reduce_constant ( const BitValueRepresentation arg) const
pure virtual

◆ type()

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

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


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