PandA-2024.02
Macros | Functions | Variables
soft_float_cg_ext.cpp File Reference

Step that extends the call graph with the soft-float calls where appropriate. More...

#include "soft_float_cg_ext.hpp"
#include "design_flow_graph.hpp"
#include "design_flow_manager.hpp"
#include "design_flow_step.hpp"
#include "FunctionCallOpt.hpp"
#include "application_manager.hpp"
#include "behavioral_helper.hpp"
#include "call_graph.hpp"
#include "call_graph_manager.hpp"
#include "function_behavior.hpp"
#include "basic_block.hpp"
#include "basic_blocks_graph_constructor.hpp"
#include "op_graph.hpp"
#include "Parameter.hpp"
#include "custom_map.hpp"
#include <algorithm>
#include <deque>
#include <list>
#include <set>
#include <string>
#include "ext_tree_node.hpp"
#include "tree_basic_block.hpp"
#include "tree_helper.hpp"
#include "tree_manager.hpp"
#include "tree_manipulation.hpp"
#include "tree_node.hpp"
#include "tree_node_dup.hpp"
#include "tree_reindex.hpp"
#include "var_pp_functor.hpp"
#include "dbgPrintHelper.hpp"
#include "exceptions.hpp"
#include "math.h"
#include "string_manipulation.hpp"
#include <boost/multiprecision/integer.hpp>
#include <regex>
Include dependency graph for soft_float_cg_ext.cpp:

Go to the source code of this file.

Macros

#define FLOAT_CAST_FU_NAME   "__float_cast"
 
#define FP_FORMAT_EXP   1
 
#define FP_FORMAT_SIG   2
 
#define FP_FORMAT_BIAS   3
 
#define FP_FORMAT_RND   4
 
#define FP_FORMAT_EXC   5
 
#define FP_FORMAT_SPEC   6
 
#define FP_FORMAT_SIGN   7
 

Functions

static const FloatFormatRef float32FF (new FloatFormat(8, 23, -127))
 
static const FloatFormatRef float64FF (new FloatFormat(11, 52, -1023))
 
static std::string strip_fname (std::string fname, bool *single_prec=nullptr)
 

Variables

static const std::set< std::string > supported_libm_calls
 
static const std::set< std::string > supported_libm_calls_inlined = {"copysign", "fabs"}
 
static const std::set< std::string > libm_func
 List of low level implementation libm functions. More...
 

Detailed Description

Step that extends the call graph with the soft-float calls where appropriate.

Author
Fabrizio Ferrandi fabri.nosp@m.zio..nosp@m.ferra.nosp@m.ndi@.nosp@m.polim.nosp@m.i.it
Michele Fiorito miche.nosp@m.le.f.nosp@m.iorit.nosp@m.o@po.nosp@m.limi..nosp@m.it

Definition in file soft_float_cg_ext.cpp.

Macro Definition Documentation

◆ FLOAT_CAST_FU_NAME

#define FLOAT_CAST_FU_NAME   "__float_cast"

Definition at line 1351 of file soft_float_cg_ext.cpp.

Referenced by soft_float_cg_ext::generate_interface().

◆ FP_FORMAT_BIAS

#define FP_FORMAT_BIAS   3

Definition at line 2796 of file soft_float_cg_ext.cpp.

Referenced by FloatFormat::FromString().

◆ FP_FORMAT_EXC

#define FP_FORMAT_EXC   5

Definition at line 2798 of file soft_float_cg_ext.cpp.

Referenced by FloatFormat::FromString().

◆ FP_FORMAT_EXP

#define FP_FORMAT_EXP   1

Definition at line 2794 of file soft_float_cg_ext.cpp.

Referenced by FloatFormat::FromString().

◆ FP_FORMAT_RND

#define FP_FORMAT_RND   4

Definition at line 2797 of file soft_float_cg_ext.cpp.

Referenced by FloatFormat::FromString().

◆ FP_FORMAT_SIG

#define FP_FORMAT_SIG   2

Definition at line 2795 of file soft_float_cg_ext.cpp.

Referenced by FloatFormat::FromString().

◆ FP_FORMAT_SIGN

#define FP_FORMAT_SIGN   7

Definition at line 2800 of file soft_float_cg_ext.cpp.

Referenced by FloatFormat::FromString().

◆ FP_FORMAT_SPEC

#define FP_FORMAT_SPEC   6

Definition at line 2799 of file soft_float_cg_ext.cpp.

Referenced by FloatFormat::FromString().

Function Documentation

◆ float32FF()

static const FloatFormatRef float32FF ( new   FloatFormat8, 23, -127)
static

◆ float64FF()

static const FloatFormatRef float64FF ( new   FloatFormat11, 52, -1023)
static

◆ strip_fname()

static std::string strip_fname ( std::string  fname,
bool single_prec = nullptr 
)
static

Definition at line 128 of file soft_float_cg_ext.cpp.

Referenced by soft_float_cg_ext::RecursiveExaminate(), and soft_float_cg_ext::soft_float_cg_ext().

Here is the caller graph for this function:

Variable Documentation

◆ libm_func

const std::set<std::string> libm_func
static
Initial value:
= {
"acos", "acosh", "asin", "asinh", "atan", "atanh", "atan2", "cbrt", "ceil",
"copysign", "cos", "cosh", "erf", "erfc", "exp", "exp2", "expm1", "fabs",
"fdim", "finite", "floor", "fma", "fmod", "fpclassify", "frexp", "huge_val", "hypot",
"ilogb", "inf", "infinity", "isfinite", "isinf", "isinf_sign", "isnan", "isnormal", "ldexp",
"lgamma", "llrint", "llround", "log", "log10", "log1p", "log2", "logb", "lrint",
"lround", "modf", "nan", "nans", "nearbyint", "nextafter", "nexttoward", "pow", "remainder",
"remquo", "rint", "round", "scalb", "scalbln", "scalbn", "sin", "signbit", "sinh",
"sincos", "sqrt", "tan", "tanh", "tgamma", "trunc"}

List of low level implementation libm functions.

Composite functions are not present since fp format can be safely propagated there.

Definition at line 118 of file soft_float_cg_ext.cpp.

◆ supported_libm_calls

const std::set<std::string> supported_libm_calls
static
Initial value:
= {
"copysign", "fabs", "finite", "fpclassify", "huge_val", "inf", "infinity", "isfinite",
"isinf", "isinf_sign", "isnan", "isnormal", "nan", "nans", "signbit"}

Definition at line 108 of file soft_float_cg_ext.cpp.

◆ supported_libm_calls_inlined

const std::set<std::string> supported_libm_calls_inlined = {"copysign", "fabs"}
static

Definition at line 111 of file soft_float_cg_ext.cpp.


Generated on Mon Feb 12 2024 13:03:21 for PandA-2024.02 by doxygen 1.8.13