diff --git a/functions/.pragma.c.swp b/functions/.pragma.c.swp deleted file mode 100644 index 8f4a55176f396d4c18ff1e593bc881c447b2796d..0000000000000000000000000000000000000000 Binary files a/functions/.pragma.c.swp and /dev/null differ diff --git a/functions/pragma.c b/functions/pragma.c index 164607ee19934471db8feeeb1d1fec02ec1415df..078fc96b27b460a03595df505973f1cbee8fecc0 100644 --- a/functions/pragma.c +++ b/functions/pragma.c @@ -2,6 +2,7 @@ vec<const char*> pragma_func_names; vec<const char*> pragma_func_names_temp; +vec<const char*> analyzed_functions; static void my_pragma_action(cpp_reader *ARG_UNUSED(dummy)) { @@ -96,3 +97,23 @@ static void register_my_pragma(void *event_data, void *data) } +void compare_pragma_funcs_analyzed_funcs(){ + const char *pragma_elt; + const char *analyzed_elt; + for(int ix = 0; pragma_func_names.iterate (ix, &pragma_elt); ix++){ + for(int jx = 0; analyzed_functions.iterate (jx, &analyzed_elt); jx++){ + if(strcmp(pragma_elt, analyzed_elt)!=0) + printf("WARNING :Pragma indicates unexisting function %s\n ",pragma_elt ); + } + } +} + + + + + + + + + + diff --git a/functions/pragma.h b/functions/pragma.h index 5fdc1607969e18c94f6a40a3fff3437e38431daa..1501a051dcc968bd1591b34ff43afb0c84d9dcaf 100644 --- a/functions/pragma.h +++ b/functions/pragma.h @@ -3,5 +3,5 @@ static void register_my_pragma(void *event_data, void *data); static void my_pragma_action(cpp_reader *ARG_UNUSED(dummy)); - +void compare_pragma_funcs_analyzed_funcs(); #endif diff --git a/plugin.cpp b/plugin.cpp index 19dd67a14bedf800bd208ddfb5e45d493057b3fa..687fd709676d811f98ef521635b124baf11a3bc4 100755 --- a/plugin.cpp +++ b/plugin.cpp @@ -75,6 +75,7 @@ class split_count_pass : public gimple_opt_pass { bool func_to_be_analyzed = true; + printf("=> plugin: split_count_pass... \n"); printf("=> plugin: gate... \n"); if((pragma_func_names.length() == 0)){ @@ -145,6 +146,7 @@ class cleanup_pass : public gimple_opt_pass printf("=> plugin: execute...\n"); printf("... in function %s\n\n", function_name(fun)); + compare_pragma_funcs_analyzed_funcs(); edit_all_aux_value(fun,(int*)NULL); return 0; }