retdec
llvm_fcmp_converter.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_LLVMIR2HLL_LLVM_LLVMIR2BIR_CONVERTER_LLVM_FCMP_CONVERTER_H
8 #define RETDEC_LLVMIR2HLL_LLVM_LLVMIR2BIR_CONVERTER_LLVM_FCMP_CONVERTER_H
9 
13 
14 namespace llvm {
15 
16 class FCmpInst;
17 
18 } // namespace llvm
19 
20 namespace retdec {
21 namespace llvmir2hll {
22 
23 class Expression;
24 
29 public:
30  LLVMFCmpConverter() = default;
31  ~LLVMFCmpConverter() = default;
32 
34  ShPtr<Expression> op2, unsigned predicate);
35 
38  void setOptionStrictFPUSemantics(bool strict = true);
40 
41 private:
44 
45  template<class T>
47  ShPtr<Expression> op2) const;
48  template<class T>
50  ShPtr<Expression> op2) const;
51 
54 };
55 
56 } // namespace llvmir2hll
57 } // namespace retdec
58 
59 #endif
A converter from LLVM fcmp instruction to expression in BIR.
Definition: llvm_fcmp_converter.h:28
ShPtr< Expression > getOrdFCmpExpr(ShPtr< Expression > op1, ShPtr< Expression > op2) const
Returns logical expression which represents a comparison of two float operands op1 and op2,...
Definition: llvm_fcmp_converter.cpp:155
bool optionStrictFPUSemantics
Use strict FPU semantics?
Definition: llvm_fcmp_converter.h:53
ShPtr< Expression > convertToExpression(ShPtr< Expression > op1, ShPtr< Expression > op2, unsigned predicate)
Converts the given LLVM fcmp instruction inst into an expression in BIR.
Definition: llvm_fcmp_converter.cpp:34
ShPtr< Expression > getUnordFCmpExpr(ShPtr< Expression > op1, ShPtr< Expression > op2) const
Returns logical expression which represents a comparison of two float operands op1 and op2,...
Definition: llvm_fcmp_converter.cpp:167
ShPtr< Expression > getExprIsQNAN(ShPtr< Expression > op) const
Returns expression which determines if given Expression op is a QNAN.
Definition: llvm_fcmp_converter.cpp:136
ShPtr< Expression > getExprIsNotQNAN(ShPtr< Expression > op) const
Returns expression which determines if given Expression op is not a QNAN.
Definition: llvm_fcmp_converter.cpp:144
void setOptionStrictFPUSemantics(bool strict=true)
Enables/disables the use of strict FPU semantics.
Definition: llvm_fcmp_converter.cpp:129
A mixin to make classes non-copyable.
Definition: non_copyable.h:27
Definition: itanium_ast_ctypes_parser.h:12
A library providing API for working with back-end IR.
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
Definition: archive_wrapper.h:19
A mixin to make classes non-copyable.
Declarations, aliases, macros, etc. for the use of smart pointers.
Aliases for several useful types.