Jlm
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
jlm::llvm::IntegerXorOperation Class Referencefinal

#include <IntegerOperations.hpp>

Inheritance diagram for jlm::llvm::IntegerXorOperation:
Inheritance graph
[legend]
Collaboration diagram for jlm::llvm::IntegerXorOperation:
Collaboration graph
[legend]

Public Member Functions

 ~IntegerXorOperation () noexcept override
 
 IntegerXorOperation (const std::size_t numBits)
 
bool operator== (const Operation &other) const noexcept override
 
std::string debug_string () const override
 
std::unique_ptr< Operation > copy () const override
 
rvsdg::binop_reduction_path_t can_reduce_operand_pair (const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
 
rvsdg::Outputreduce_operand_pair (rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
 
enum flags flags () const noexcept override
 
- Public Member Functions inherited from jlm::llvm::IntegerBinaryOperation
 ~IntegerBinaryOperation () noexcept override
 
 IntegerBinaryOperation (const std::size_t numArgumentBits, const std::size_t numResultBits) noexcept
 
const rvsdg::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)
 
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
 
bool operator!= (const Operation &other) const noexcept
 

Static Public Member Functions

static rvsdg::NodecreateNode (const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
 
static std::optional< std::vector< rvsdg::Output * > > foldConstants (const IntegerXorOperation &operation, const std::vector< rvsdg::Output * > &operands)
 

Additional Inherited Members

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

Detailed Description

This operation is equivalent to LLVM's 'xor' instruction for integer operands. See LLVM Language Reference Manual for more details.

Definition at line 782 of file IntegerOperations.hpp.

Constructor & Destructor Documentation

◆ ~IntegerXorOperation()

jlm::llvm::IntegerXorOperation::~IntegerXorOperation ( )
overridedefaultnoexcept

◆ IntegerXorOperation()

jlm::llvm::IntegerXorOperation::IntegerXorOperation ( const std::size_t  numBits)
inlineexplicit

Definition at line 787 of file IntegerOperations.hpp.

Member Function Documentation

◆ can_reduce_operand_pair()

rvsdg::binop_reduction_path_t jlm::llvm::IntegerXorOperation::can_reduce_operand_pair ( const rvsdg::Output op1,
const rvsdg::Output op2 
) const
overridevirtualnoexcept

Implements jlm::rvsdg::BinaryOperation.

Definition at line 787 of file IntegerOperations.cpp.

◆ copy()

std::unique_ptr< rvsdg::Operation > jlm::llvm::IntegerXorOperation::copy ( ) const
overridevirtual

Implements jlm::rvsdg::Operation.

Definition at line 781 of file IntegerOperations.cpp.

◆ createNode()

static rvsdg::Node & jlm::llvm::IntegerXorOperation::createNode ( const size_t  numBits,
rvsdg::Output operand1,
rvsdg::Output operand2 
)
inlinestatic

Definition at line 812 of file IntegerOperations.hpp.

◆ debug_string()

std::string jlm::llvm::IntegerXorOperation::debug_string ( ) const
overridevirtual

Implements jlm::rvsdg::Operation.

Definition at line 775 of file IntegerOperations.cpp.

◆ flags()

Reimplemented from jlm::rvsdg::BinaryOperation.

Definition at line 803 of file IntegerOperations.cpp.

◆ foldConstants()

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

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

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

Definition at line 809 of file IntegerOperations.cpp.

◆ operator==()

bool jlm::llvm::IntegerXorOperation::operator== ( const Operation &  other) const
overridenoexcept

Definition at line 768 of file IntegerOperations.cpp.

◆ reduce_operand_pair()

rvsdg::Output * jlm::llvm::IntegerXorOperation::reduce_operand_pair ( rvsdg::binop_reduction_path_t  path,
rvsdg::Output op1,
rvsdg::Output op2 
) const
overridevirtual

Implements jlm::rvsdg::BinaryOperation.

Definition at line 794 of file IntegerOperations.cpp.


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