retdec
Public Member Functions | Private Member Functions | Private Attributes | List of all members
retdec::llvmir2hll::LLVMFCmpConverter Class Referencefinal

A converter from LLVM fcmp instruction to expression in BIR. More...

#include <llvm_fcmp_converter.h>

Inheritance diagram for retdec::llvmir2hll::LLVMFCmpConverter:
Inheritance graph
[legend]
Collaboration diagram for retdec::llvmir2hll::LLVMFCmpConverter:
Collaboration graph
[legend]

Public Member Functions

 LLVMFCmpConverter ()=default
 
 ~LLVMFCmpConverter ()=default
 
ShPtr< ExpressionconvertToExpression (ShPtr< Expression > op1, ShPtr< Expression > op2, unsigned predicate)
 Converts the given LLVM fcmp instruction inst into an expression in BIR. More...
 
Options
void setOptionStrictFPUSemantics (bool strict=true)
 Enables/disables the use of strict FPU semantics. More...
 

Private Member Functions

ShPtr< ExpressiongetExprIsNotQNAN (ShPtr< Expression > op) const
 Returns expression which determines if given Expression op is not a QNAN. More...
 
ShPtr< ExpressiongetExprIsQNAN (ShPtr< Expression > op) const
 Returns expression which determines if given Expression op is a QNAN. More...
 
template<class T >
ShPtr< ExpressiongetOrdFCmpExpr (ShPtr< Expression > op1, ShPtr< Expression > op2) const
 Returns logical expression which represents a comparison of two float operands op1 and op2, when both operands are not a QNAN. More...
 
template<class T >
ShPtr< ExpressiongetUnordFCmpExpr (ShPtr< Expression > op1, ShPtr< Expression > op2) const
 Returns logical expression which represents a comparison of two float operands op1 and op2, when either operand can be a QNAN. More...
 
- Private Member Functions inherited from retdec::utils::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
 NonCopyable ()=default
 
 ~NonCopyable ()=default
 

Private Attributes

bool optionStrictFPUSemantics = false
 Use strict FPU semantics? More...
 

Detailed Description

A converter from LLVM fcmp instruction to expression in BIR.

Constructor & Destructor Documentation

◆ LLVMFCmpConverter()

retdec::llvmir2hll::LLVMFCmpConverter::LLVMFCmpConverter ( )
default

◆ ~LLVMFCmpConverter()

retdec::llvmir2hll::LLVMFCmpConverter::~LLVMFCmpConverter ( )
default

Member Function Documentation

◆ convertToExpression()

ShPtr< Expression > retdec::llvmir2hll::LLVMFCmpConverter::convertToExpression ( ShPtr< Expression op1,
ShPtr< Expression op2,
unsigned  predicate 
)

Converts the given LLVM fcmp instruction inst into an expression in BIR.

Parameters
[in]op1Already converted first operand as expression in BIR.
[in]op2Already converted second operand as expression in BIR.
[in]predicateGiven fcmp predicate.

◆ getExprIsNotQNAN()

ShPtr< Expression > retdec::llvmir2hll::LLVMFCmpConverter::getExprIsNotQNAN ( ShPtr< Expression op) const
private

Returns expression which determines if given Expression op is not a QNAN.

◆ getExprIsQNAN()

ShPtr< Expression > retdec::llvmir2hll::LLVMFCmpConverter::getExprIsQNAN ( ShPtr< Expression op) const
private

Returns expression which determines if given Expression op is a QNAN.

◆ getOrdFCmpExpr()

template<class T >
ShPtr< Expression > retdec::llvmir2hll::LLVMFCmpConverter::getOrdFCmpExpr ( ShPtr< Expression op1,
ShPtr< Expression op2 
) const
private

Returns logical expression which represents a comparison of two float operands op1 and op2, when both operands are not a QNAN.

Template Parameters
TClass that represents a comparison operator in BIR.

◆ getUnordFCmpExpr()

template<class T >
ShPtr< Expression > retdec::llvmir2hll::LLVMFCmpConverter::getUnordFCmpExpr ( ShPtr< Expression op1,
ShPtr< Expression op2 
) const
private

Returns logical expression which represents a comparison of two float operands op1 and op2, when either operand can be a QNAN.

Template Parameters
TClass that represents a comparison operator in BIR.

◆ setOptionStrictFPUSemantics()

void retdec::llvmir2hll::LLVMFCmpConverter::setOptionStrictFPUSemantics ( bool  strict = true)

Enables/disables the use of strict FPU semantics.

Parameters
[in]strictIf true, enables the use of strict FPU semantics. If false, disables the use of strict FPU semantics.

Member Data Documentation

◆ optionStrictFPUSemantics

bool retdec::llvmir2hll::LLVMFCmpConverter::optionStrictFPUSemantics = false
private

Use strict FPU semantics?


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