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

#include <operators.hpp>

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

Public Member Functions

 ~FCmpOperation () noexcept override
 
 FCmpOperation (const fpcmp &cmp, const fpsize &size)
 
 FCmpOperation (const fpcmp &cmp, 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 fpcmp & cmp () 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::optional< std::vector< rvsdg::Output * > > foldConstants (const FCmpOperation &operation, const std::vector< rvsdg::Output * > &operands)
 
static std::unique_ptr< llvm::ThreeAddressCode > create (const fpcmp &cmp, const Variable *op1, const Variable *op2)
 

Private Attributes

fpcmp cmp_
 

Additional Inherited Members

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

Detailed Description

Definition at line 619 of file operators.hpp.

Constructor & Destructor Documentation

◆ ~FCmpOperation()

jlm::llvm::FCmpOperation::~FCmpOperation ( )
overridedefaultnoexcept

◆ FCmpOperation() [1/2]

jlm::llvm::FCmpOperation::FCmpOperation ( const fpcmp &  cmp,
const fpsize &  size 
)
inline

Definition at line 624 of file operators.hpp.

◆ FCmpOperation() [2/2]

jlm::llvm::FCmpOperation::FCmpOperation ( const fpcmp &  cmp,
const std::shared_ptr< const FloatingPointType > &  fpt 
)
inline

Definition at line 631 of file operators.hpp.

Member Function Documentation

◆ can_reduce_operand_pair()

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

Implements jlm::rvsdg::BinaryOperation.

Definition at line 468 of file operators.cpp.

◆ cmp()

const fpcmp & jlm::llvm::FCmpOperation::cmp ( ) const
inlinenoexcept

Definition at line 656 of file operators.hpp.

◆ copy()

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

Implements jlm::rvsdg::Operation.

Definition at line 462 of file operators.cpp.

◆ create()

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

Definition at line 681 of file operators.hpp.

◆ debug_string()

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

Implements jlm::rvsdg::Operation.

Definition at line 440 of file operators.cpp.

◆ foldConstants()

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

Definition at line 481 of file operators.cpp.

◆ operator==()

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

Definition at line 433 of file operators.cpp.

◆ reduce_operand_pair()

rvsdg::Output * jlm::llvm::FCmpOperation::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 474 of file operators.cpp.

◆ size()

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

Definition at line 662 of file operators.hpp.

Member Data Documentation

◆ cmp_

fpcmp jlm::llvm::FCmpOperation::cmp_
private

Definition at line 692 of file operators.hpp.


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