8 #ifndef RETDEC_LLVMIR2HLL_LLVM_LLVM_INTRINSIC_CONVERTER_H
9 #define RETDEC_LLVMIR2HLL_LLVM_LLVM_INTRINSIC_CONVERTER_H
80 const std::string &newName);
82 const std::string &baseName);
Conversion of LLVM intrinsic functions into functions from the standard C library.
Definition: llvm_intrinsic_converter.h:69
void convertIntrinsicFuncName(ShPtr< Function > func)
If supported, converts the given LLVM intrinsic function's name into an appropriate name of a standar...
Definition: llvm_intrinsic_converter.cpp:116
void renameFloatIntrinsicFunc(ShPtr< Function > func, const std::string &baseName)
Renames the given LLVM floating-point intrinsic function.
Definition: llvm_intrinsic_converter.cpp:197
static void convert(ShPtr< Module > module)
Converts LLVM intrinsic functions in module into standard-C-library functions.
Definition: llvm_intrinsic_converter.cpp:68
LLVMIntrinsicConverter(ShPtr< Module > module)
Constructs a new converter.
Definition: llvm_intrinsic_converter.cpp:56
virtual void visit(ShPtr< GlobalVarDef > varDef) override
Definition: ordered_all_visitor.cpp:95
void renameIntrinsicFunc(ShPtr< Function > func, const std::string &newName)
Renames the given LLVM intrinsic function.
Definition: llvm_intrinsic_converter.cpp:184
void performConversion()
Performs the conversion of LLVM intrinsic functions into functions from the standard C library.
Definition: llvm_intrinsic_converter.cpp:81
bool isIntrinsicFunc(ShPtr< Function > func) const
Returns true if the given function is an LLVM intrinsic function, false otherwise.
Definition: llvm_intrinsic_converter.cpp:103
ShPtr< Module > module
Module in which LLVM intrinsic functions are converted.
Definition: llvm_intrinsic_converter.h:94
StringSet renamedFuncNames
Set of new names for changed LLVM intrinsics.
Definition: llvm_intrinsic_converter.h:97
void trimLastNArgsAndParams(ShPtr< CallExpr > expr, ShPtr< Function > func, unsigned m, unsigned n)
Removes the last n arguments from expr and the last n parameters from the function declaration func.
Definition: llvm_intrinsic_converter.cpp:209
A visitor that visits everything in an ordered way.
Definition: ordered_all_visitor.h:44
virtual void visit(ShPtr< GlobalVarDef > varDef) override
Definition: ordered_all_visitor.cpp:95
A mixin to make classes non-copyable.
Definition: non_copyable.h:27
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
std::set< std::string > StringSet
Set of strings.
Definition: types.h:51
Definition: archive_wrapper.h:19
A mixin to make classes non-copyable.
A visitor that visits everything in an ordered way.
Declarations, aliases, macros, etc. for the use of smart pointers.