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

#include <operators.hpp>

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

Public Member Functions

 ~FBinaryOperation () noexcept override
 
 FBinaryOperation (const llvm::fpop &op, const fpsize &size)
 
 FBinaryOperation (const llvm::fpop &op, const std::shared_ptr< const FloatingPointType > &fpt)
 
bool operator== (const Operation &other) const noexcept override
 
std::string debug_string () const override
 
std::unique_ptr< Operation > copy () const override
 
jlm::rvsdg::binop_reduction_path_t can_reduce_operand_pair (const jlm::rvsdg::Output *op1, const jlm::rvsdg::Output *op2) const noexcept override
 
jlm::rvsdg::Output * reduce_operand_pair (jlm::rvsdg::binop_reduction_path_t path, jlm::rvsdg::Output *op1, jlm::rvsdg::Output *op2) const override
 
const llvm::fpop & fpop () const noexcept
 
const fpsize & size () 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
 
bool operator!= (const Operation &other) const noexcept
 

Static Public Member Functions

static std::unique_ptr< llvm::ThreeAddressCode > create (const llvm::fpop &fpop, const Variable *op1, const Variable *op2)
 
static std::optional< std::vector< rvsdg::Output * > > foldConstants (const FBinaryOperation &operation, const std::vector< rvsdg::Output * > &operands)
 

Private Attributes

llvm::fpop op_
 

Additional Inherited Members

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

Detailed Description

Definition at line 888 of file operators.hpp.

Constructor & Destructor Documentation

◆ ~FBinaryOperation()

jlm::llvm::FBinaryOperation::~FBinaryOperation ( )
overridedefaultnoexcept

◆ FBinaryOperation() [1/2]

jlm::llvm::FBinaryOperation::FBinaryOperation ( const llvm::fpop &  op,
const fpsize &  size 
)
inline

Definition at line 893 of file operators.hpp.

◆ FBinaryOperation() [2/2]

jlm::llvm::FBinaryOperation::FBinaryOperation ( const llvm::fpop &  op,
const std::shared_ptr< const FloatingPointType > &  fpt 
)
inline

Definition at line 900 of file operators.hpp.

Member Function Documentation

◆ can_reduce_operand_pair()

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

Implements jlm::rvsdg::BinaryOperation.

Definition at line 671 of file operators.cpp.

◆ copy()

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

Implements jlm::rvsdg::Operation.

Definition at line 665 of file operators.cpp.

◆ create()

static std::unique_ptr< llvm::ThreeAddressCode > jlm::llvm::FBinaryOperation::create ( const llvm::fpop &  fpop,
const Variable *  op1,
const Variable *  op2 
)
inlinestatic

Definition at line 937 of file operators.hpp.

◆ debug_string()

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

Implements jlm::rvsdg::Operation.

Definition at line 652 of file operators.cpp.

◆ foldConstants()

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

Definition at line 687 of file operators.cpp.

◆ fpop()

const llvm::fpop & jlm::llvm::FBinaryOperation::fpop ( ) const
inlinenoexcept

Definition at line 925 of file operators.hpp.

◆ operator==()

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

Definition at line 645 of file operators.cpp.

◆ reduce_operand_pair()

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

Implements jlm::rvsdg::BinaryOperation.

Definition at line 678 of file operators.cpp.

◆ size()

const fpsize & jlm::llvm::FBinaryOperation::size ( ) const
inlinenoexcept

Definition at line 931 of file operators.hpp.

Member Data Documentation

◆ op_

llvm::fpop jlm::llvm::FBinaryOperation::op_
private

Definition at line 961 of file operators.hpp.


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