69 const DesignFlowManagerConstRef _design_flow_manager,
const ParameterConstRef _parameters)
81 switch(relationship_type)
100 return relationships;
107 auto* fdcur = GetPointer<function_decl>(temp);
108 auto*
sl = GetPointer<statement_list>(
GET_NODE(fdcur->body));
109 bool bb_modified =
false;
112 for(
const auto&
block : sl->list_of_bloc)
115 for(
const auto& statement :
block.second->CGetStmtList())
118 if(
GET_NODE(statement)->get_kind() == gimple_call_K)
120 auto* ce = GetPointer<gimple_call>(
GET_NODE(statement));
121 std::vector<tree_nodeRef>&
args = ce->args;
122 auto* ae = GetPointer<addr_expr>(
GET_NODE(ce->fn));
123 if(ae && args.size())
125 auto* fd = GetPointer<function_decl>(
GET_NODE(ae->op));
126 if(!fd->undefined_flag)
129 auto* fun_type = GetPointer<function_type>(functionType);
130 bool is_var_args_p = fun_type->varargs_flag;
135 unsigned int count_param = 0;
139 auto* node = GetPointer<tree_list>(elem);
140 paramList = node->chan;
141 if(
GET_NODE(node->valu)->get_kind() != void_type_K)
146 if(fd->list_of_args.size() == 0 && count_param == 0)
162 if(
GET_NODE(statement)->get_kind() == gimple_assign_K)
164 auto* ga = GetPointer<gimple_assign>(
GET_NODE(statement));
165 if(
GET_NODE(ga->op1)->get_kind() == call_expr_K ||
GET_NODE(ga->op1)->get_kind() == aggr_init_expr_K)
167 auto* ce = GetPointer<call_expr>(
GET_NODE(ga->op1));
168 std::vector<tree_nodeRef>&
args = ce->args;
169 auto* ae = GetPointer<addr_expr>(
GET_NODE(ce->fn));
170 if(ae && args.size())
172 auto* fd = GetPointer<function_decl>(
GET_NODE(ae->op));
173 if(!fd->undefined_flag)
176 auto* fun_type = GetPointer<function_type>(functionType);
177 bool is_var_args_p = fun_type->varargs_flag;
182 unsigned int count_param = 0;
186 auto* node = GetPointer<tree_list>(elem);
187 paramList = node->chan;
188 if(
GET_NODE(node->valu)->get_kind() != void_type_K)
193 if(fd->list_of_args.size() == 0 && count_param == 0)
#define GET_NODE(t)
Macro used to hide implementation details when accessing a tree_node from another tree_node...
#define DEBUG_LEVEL_VERY_PEDANTIC
extremely verbose debugging print is performed.
#define INDENT_DBG_MEX(dbgLevel, curDbgLevel, mex)
We are producing a debug version of the program, so the message is printed;.
File containing functions and utilities to support the printing of debug messagges.
Step successfully executed.
#define GET_CLASS(obj)
Macro returning the actual type of an object.
Definition of the class representing a generic C application.
RelationshipType
The relationship type.
Source must be executed to satisfy target.
static std::string print_function_name(const tree_managerConstRef &TM, const function_decl *fd)
Return the name of the function in a string.
Data structure describing a basic block at tree level.
DesignFlowStep_Status InternalExec() override
Updates the tree to have a more compliant IR.
Auxiliary methods for manipulating string.
std::string ToString(ActorGraphBackend_Type actor_graph_backend_type)
Header include.
const tree_nodeRef get_tree_node_const(unsigned int i) const
Return the reference to the i-th tree_node Constant version of get_tree_node.
#define THROW_UNREACHABLE(str_expr)
helper function used to specify that some points should never be reached
~call_expr_fix() override
Destructor.
Analysis step which fix a non-void list of parameters to function with void as input parameter type...
Target must be reexecuted.
Classes specification of the tree_node data structures.
DesignFlowStep_Status
The status of a step.
#define DEBUG_LEVEL_NONE
no debugging print is performed.
This struct specifies the block node.
This file collects some utility functions.
const unsigned int function_id
The index of the function to be analyzed.
const application_managerRef AppM
The application manager.
Class specification of the tree_reindex support class.
call_expr_fix(const application_managerRef AppM, unsigned int function_id, const DesignFlowManagerConstRef design_flow_manager, const ParameterConstRef parameters)
Constructor.
const CustomUnorderedSet< std::pair< FrontendFlowStepType, FunctionRelationship > > ComputeFrontendRelationships(const DesignFlowStep::RelationshipType relationship_type) const override
Return the set of analyses in relationship with this design step.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
this class is used to manage the command-line or XML options.
int debug_level
The debug level.
Class specification of the manager of the tree structures extracted from the raw file.
A brief description of the C++ Header File.
const FunctionBehaviorRef function_behavior
The function behavior of the function to be analyzed.