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

#include <IntegerOperations.hpp>

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

Public Member Functions

 ~IntegerUDivOperation () noexcept override
 
 IntegerUDivOperation (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 IntegerUDivOperation &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 'udiv' instruction for integer operands. See LLVM Language Reference Manual for more details.

Definition at line 334 of file IntegerOperations.hpp.

Constructor & Destructor Documentation

◆ ~IntegerUDivOperation()

jlm::llvm::IntegerUDivOperation::~IntegerUDivOperation ( )
overridedefaultnoexcept

◆ IntegerUDivOperation()

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

Definition at line 339 of file IntegerOperations.hpp.

Member Function Documentation

◆ can_reduce_operand_pair()

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

Implements jlm::rvsdg::BinaryOperation.

Definition at line 379 of file IntegerOperations.cpp.

◆ copy()

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

Implements jlm::rvsdg::Operation.

Definition at line 373 of file IntegerOperations.cpp.

◆ createNode()

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

Definition at line 364 of file IntegerOperations.hpp.

◆ debug_string()

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

Implements jlm::rvsdg::Operation.

Definition at line 367 of file IntegerOperations.cpp.

◆ flags()

Reimplemented from jlm::rvsdg::BinaryOperation.

Definition at line 395 of file IntegerOperations.cpp.

◆ foldConstants()

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

Performs constant folding by statically evaluating the two constant operands and replacing the operation's result with the resulting constant.

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

Definition at line 401 of file IntegerOperations.cpp.

◆ operator==()

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

Definition at line 360 of file IntegerOperations.cpp.

◆ reduce_operand_pair()

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

Implements jlm::rvsdg::BinaryOperation.

Definition at line 386 of file IntegerOperations.cpp.


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