All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
function_helper.h
Go to the documentation of this file.
1 #ifndef FUNCTION_HELPER_H_INCLUDED_
2 #define FUNCTION_HELPER_H_INCLUDED_
3 
4 #include "rose.h"
5 
6 #include "../segment_graph/segment_graph.h"
7 
8 #include <list>
9 
10 namespace risc
11 {
12 
13 namespace tools
14 {
15 
27 SgFunctionDeclaration*
29  SgFunctionCallExp *func_call);
30 
39 SgFunctionDeclaration*
41  SgFunctionCallExp *func_call);
42 
50 bool
51 function_call_belongs_to_a_port(SgFunctionCallExp *func_call_exp);
52 
57 bool
58 function_call_is_in_user_domain(SgFunctionCallExp *func_call_exp);
59 
66 std::vector<SgFunctionDeclaration*>
67 get_all_other_function_declarations(SgFunctionDeclaration *func_decl);
68 
73 std::list<SgClassDefinition*>
74 get_channel_interfaces(SgClassDefinition *channel_def);
75 
86 std::list<SgClassDefinition*>
87 get_all_used_interfaces(bool only_in_user_domain = true);
88 
93 std::list<SgFunctionCallExp*>
95 
103 std::list<SgFunctionDeclaration*>
105  SgClassDefinition *channel_def,
106  bool only_annotated = false);
107 
115 std::list<SgFunctionDeclaration*>
117  bool only_in_user_domain = true,
118  bool only_annotated = false);
119 
124 bool is_annotated_function(SgFunctionDeclaration *func_decl);
125 
131 bool has_reference_parameter(SgFunctionDeclaration *func_decl);
132 
139 SgFunctionDeclaration*
140 get_first_non_defining_function_declaration(SgFunctionCallExp *func_call_exp);
141 
148 bool is_overloaded_operator(SgFunctionDeclaration *func_decl);
149 
155 SgVariableDefinition* get_port_variable(SgFunctionCallExp *func_call_exp);
156 
163 SgVariableDefinition* get_socket_variable(SgExpression *expr,
164  int& type);
165 
174 std::set<SgFunctionDeclaration*>
176  SgFunctionCallExp *func_call,
177  SgVariableDefinition* socket_var);
178 
185 std::set<SgFunctionDeclaration*>
186 get_registered_b_transport_funcs_statically(SgVariableDefinition* socket_var);
187 
196 std::set<SgFunctionDeclaration*>
198  SgFunctionCallExp *func_call,
199  SgVariableDefinition* socket_var);
200 
209 std::set<SgFunctionDeclaration*>
211  SgFunctionCallExp *func_call,
212  SgVariableDefinition* socket_var);
213 
220 std::set<SgFunctionDeclaration*>
221 get_registered_get_dmi_funcs_statically(SgVariableDefinition* socket_var);
222 
231 std::set<SgFunctionDeclaration*>
233  SgFunctionCallExp *func_call,
234  SgVariableDefinition* socket_var);
235 
244 std::set<SgFunctionDeclaration*>
246  SgFunctionCallExp *func_call,
247  SgVariableDefinition* socket_var);
248 
255 std::set<SgFunctionDeclaration*>
256 get_registered_nb_transport_fw_funcs_statically(SgVariableDefinition* socket_var);
257 
266 std::set<SgFunctionDeclaration*>
268  SgFunctionCallExp *func_call,
269  SgVariableDefinition* socket_var);
270 
279 std::set<SgFunctionDeclaration*>
281  SgFunctionCallExp *func_call,
282  SgVariableDefinition* socket_var);
283 
284 
291 std::set<SgFunctionDeclaration*>
292 get_registered_nb_transport_bw_funcs_statically(SgVariableDefinition* socket_var);
293 
294 
303 std::set<SgFunctionDeclaration*>
305  SgFunctionCallExp *func_call,
306  SgVariableDefinition* socket_var);
307 
314 SgSymbol*
315 get_sym_from_def(SgVariableDefinition* def);
316 }; // end namespace tools
317 
318 }; // end namespace risc
319 
320 #endif /* FUNCTION_HELPER_H_INCLUDED_ */
321 
322 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
This class represents a segment graph for a process.
Definition: segment_graph.h:79
std::set< SgFunctionDeclaration * > get_registered_get_dmi_funcs(SgFunctionCallExp *func_call, SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s get_dmi_ptr.
Definition: function_helper.cpp:1311
std::set< SgFunctionDeclaration * > get_registered_nb_transport_fw_funcs(SgFunctionCallExp *func_call, SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s nb_transport_fw.
Definition: function_helper.cpp:1329
bool function_call_belongs_to_a_port(SgFunctionCallExp *func_call_exp)
This functions checks if the function call belongs to a port. This function should be only called aft...
Definition: function_helper.cpp:163
SgVariableDefinition * get_socket_variable(SgExpression *expr, int &type)
This function returns the socket variable of a function call.
Definition: function_helper.cpp:1170
std::list< SgClassDefinition * > get_channel_interfaces(SgClassDefinition *channel_def)
This function returns all used interfaces of the channel channel_def.
Definition: function_helper.cpp:589
std::list< SgFunctionDeclaration * > get_interface_functions(SgClassDefinition *channel_def, bool only_annotated=false)
This function returns all function declarations of the channel channel_def which belong to an interfa...
Definition: function_helper.cpp:759
std::set< SgFunctionDeclaration * > get_registered_b_transport_funcs(SgFunctionCallExp *func_call, SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s b_transport.
Definition: function_helper.cpp:1294
std::set< SgFunctionDeclaration * > get_registered_b_transport_funcs_statically(SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s b_transport.
Definition: function_helper.cpp:1365
std::set< SgFunctionDeclaration * > get_registered_b_transport_funcs_dynamically(SgFunctionCallExp *func_call, SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s b_transport.
Definition: function_helper.cpp:1509
std::vector< SgFunctionDeclaration * > get_all_other_function_declarations(SgFunctionDeclaration *func_decl)
This function gets all other functions declarations which are associated with the same function decla...
Definition: function_helper.cpp:336
bool function_call_is_in_user_domain(SgFunctionCallExp *func_call_exp)
This function checks if a function call is in the user domain.
Definition: function_helper.cpp:311
std::set< SgFunctionDeclaration * > get_registered_nb_transport_fw_funcs_statically(SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s nb_transport_fw.
Definition: function_helper.cpp:1435
std::list< SgFunctionDeclaration * > get_all_implemented_interface_functions(bool only_in_user_domain=true, bool only_annotated=false)
This functions traverses over all channels and collects the function declarations of the implemented ...
Definition: function_helper.cpp:845
std::set< SgFunctionDeclaration * > get_registered_nb_transport_bw_funcs(SgFunctionCallExp *func_call, SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s nb_transport_bw.
Definition: function_helper.cpp:1347
std::set< SgFunctionDeclaration * > get_registered_get_dmi_funcs_dynamically(SgFunctionCallExp *func_call, SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s get_dmi_ptr.
Definition: function_helper.cpp:1560
bool is_annotated_function(SgFunctionDeclaration *func_decl)
This function returns true if the annotated.
Definition: function_helper.cpp:899
SgFunctionDeclaration * get_function_declaration_of_channel_call_dynamically(SgFunctionCallExp *func_call)
This function determines which function will be called in a case of channel access. The results from dynamic analysis will be taken into account.
Definition: function_helper.cpp:362
std::list< SgClassDefinition * > get_all_used_interfaces(bool only_in_user_domain=true)
This function traverses over all channel definitions in the design. For each individual channel...
Definition: function_helper.cpp:639
std::set< SgFunctionDeclaration * > get_registered_nb_transport_bw_funcs_dynamically(SgFunctionCallExp *func_call, SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s nb_transport_bw.
Definition: function_helper.cpp:1647
SgVariableDefinition * get_port_variable(SgFunctionCallExp *func_call_exp)
This function returns the port variable of a function call.
Definition: function_helper.cpp:1019
SgFunctionDeclaration * get_first_non_defining_function_declaration(SgFunctionCallExp *func_call_exp)
This function returns for a function call the first non defining function declaration. It will be considered if it is a port call. If so, statically or dynamically the port mapping will be solved.
Definition: function_helper.cpp:930
std::set< SgFunctionDeclaration * > get_registered_nb_transport_bw_funcs_statically(SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s nb_transport_bw.
Definition: function_helper.cpp:1470
std::list< SgFunctionCallExp * > get_all_port_calls_to_annotated_functions(risc::sg::SegmentGraph &graph)
This function returns all port calls.
Definition: function_helper.cpp:815
std::set< SgFunctionDeclaration * > get_registered_get_dmi_funcs_statically(SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s get_dmi_ptr.
Definition: function_helper.cpp:1401
SgSymbol * get_sym_from_def(SgVariableDefinition *def)
This function returns the SgSymbol* from a given SgVariableDefinition*.
Definition: function_helper.cpp:24
bool has_reference_parameter(SgFunctionDeclaration *func_decl)
This function returns true if the function has at least one parameter which is taken via reference...
Definition: function_helper.cpp:915
bool is_overloaded_operator(SgFunctionDeclaration *func_decl)
This function returns true if the function overloads an operator CAUTION: This is a pre release...
Definition: function_helper.cpp:964
SgFunctionDeclaration * get_function_declaration_of_channel_call_statically(SgFunctionCallExp *func_call)
This function determines which virtual function will be called in a case of channel access...
Definition: function_helper.cpp:30
std::set< SgFunctionDeclaration * > get_registered_nb_transport_fw_funcs_dynamically(SgFunctionCallExp *func_call, SgVariableDefinition *socket_var)
This function returns a set of functions that could potentially be socket&#39;s nb_transport_fw.
Definition: function_helper.cpp:1604