diff --git a/include/mpi_collective.hpp b/include/mpi_collective.hpp index c6f9e1f64be1bf138621bcac4d745bcc5fa001fa..8df09a722926a00988b2cfb49158c9e5607f7e87 100644 --- a/include/mpi_collective.hpp +++ b/include/mpi_collective.hpp @@ -156,6 +156,7 @@ void register_mpicoll_check_pragma(void *event_data, void *data); void mpicoll_check_pragma(cpp_reader *); //raising warning for unprocessed fun in pragma and freeing memory void verify_mpicoll_list(void *event_data, void *data); + extern vec<tree> *fun_vec; //function vector in pragma. extern vec<location_t> *loc_vec; //function of the location of the token diff --git a/src/mpi_collective_pragma.cpp b/src/mpi_collective_pragma.cpp index 0b2209629536c1ad429eb54013313fdacff3babd..5452e59ffec2e2f5018a0ec66037ac4ea4fe9f75 100644 --- a/src/mpi_collective_pragma.cpp +++ b/src/mpi_collective_pragma.cpp @@ -156,4 +156,7 @@ void verify_mpicoll_list(void *event_data, void *data) } fun_vec->release(); loc_vec->release(); + + delete fun_vec; + delete loc_vec; } diff --git a/src/mpi_collective_warnings.cpp b/src/mpi_collective_warnings.cpp index 9fc800c74de609fb49a976332f61e7fcd5aff048..9a050846848a9376e2c1c6936043d2554a7d8b66 100644 --- a/src/mpi_collective_warnings.cpp +++ b/src/mpi_collective_warnings.cpp @@ -356,12 +356,12 @@ void pass_mpi_collective::raise_warning_mpi_order(function *fun) get_bb_from_index( fun, diff_index))); - warning_at (loc - , 0 - , "MPI Collective %<%s%>(%i) might not be " - "reachable due to a precedent %<%s%> call:" - , mpi_collective_name[mpi_code] - , rank, mpi_collective_name[cursor_code]); + warning_at(loc + , 0 + , "MPI Collective %<%s%>(%i) might not be " + "reachable due to a precedent %<%s%> call:" + , mpi_collective_name[mpi_code] + , rank, mpi_collective_name[cursor_code]); EXECUTE_IF_SET_IN_BITMAP(nodes, 0, index, bi) { @@ -370,11 +370,11 @@ void pass_mpi_collective::raise_warning_mpi_order(function *fun) loc = gimple_location( get_mpi_stmt( get_bb_from_index(fun, index))); - inform (loc - , "reachable %<%s%>(%i) without " - "a prior %<%s%> call:" - , mpi_collective_name[mpi_code] - , rank, mpi_collective_name[cursor_code]); + inform(loc + , "reachable %<%s%>(%i) without " + "a prior %<%s%> call:" + , mpi_collective_name[mpi_code] + , rank, mpi_collective_name[cursor_code]); } } } diff --git a/src/plugin.cpp b/src/plugin.cpp index dcf42b380c0df1abe136032535e7ce149a91e9f4..0a7cf05b0cce73ad1c40cc4922e30dc2e45c4832 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -50,12 +50,13 @@ plugin_init(struct plugin_name_args *plugin_info, } pass_mpi_collective p(g); - //irresponsible code + fun_vec = new vec<tree>; loc_vec = new vec<location_t>; + fun_vec->create(0); loc_vec->create(0); - //fun_vec.release(); //FIXME release memory in last callback + // RELEASE in verify_mpi_colllist at PLUGIN FINISH UNIT struct register_pass_info pass_info;