00001 #ifndef FUNCTION_HELPER_H_INCLUDED_ 00002 #define FUNCTION_HELPER_H_INCLUDED_ 00003 00004 #include "rose.h" 00005 00006 #include "../segment_graph/segment_graph.h" 00007 00008 #include <list> 00009 00010 namespace risc 00011 { 00012 00013 namespace tools 00014 { 00015 00026 SgFunctionDeclaration* 00027 get_function_declaration_of_channel_call_statically( 00028 SgFunctionCallExp *func_call); 00029 00037 SgFunctionDeclaration* 00038 get_function_declaration_of_channel_call_dynamically( 00039 SgFunctionCallExp *func_call); 00040 00048 bool 00049 function_call_belongs_to_a_port(SgFunctionCallExp *func_call_exp); 00050 00055 bool 00056 function_call_is_in_user_domain(SgFunctionCallExp *func_call_exp); 00057 00064 std::vector<SgFunctionDeclaration*> 00065 get_all_other_function_declarations(SgFunctionDeclaration *func_decl); 00066 00071 std::list<SgClassDefinition*> 00072 get_channel_interfaces(SgClassDefinition *channel_def); 00073 00084 std::list<SgClassDefinition*> 00085 get_all_used_interfaces(bool only_in_user_domain = true); 00086 00091 std::list<SgFunctionCallExp*> 00092 get_all_port_calls_to_annotated_functions(risc::sg::SegmentGraph &graph); 00093 00099 std::list<SgFunctionDeclaration*> 00100 get_interface_functions( 00101 SgClassDefinition *channel_def, 00102 bool only_annotated = false); 00103 00109 std::list<SgFunctionDeclaration*> 00110 get_all_implemented_interface_functions( 00111 bool only_in_user_domain = true, 00112 bool only_annotated = false); 00113 00118 bool is_annotated_function(SgFunctionDeclaration *func_decl); 00119 00125 bool has_reference_parameter(SgFunctionDeclaration *func_decl); 00126 00133 SgFunctionDeclaration* 00134 get_first_non_defining_function_declaration(SgFunctionCallExp *func_call_exp); 00135 00136 }; // end namespace tools 00137 00138 }; // end namespace risc 00139 00140 #endif /* FUNCTION_HELPER_H_INCLUDED_ */ 00141 00142 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */