From 29da5afa03814645b6fa5b55cf9b32161daf8973 Mon Sep 17 00:00:00 2001 From: "nicolas.marie" <nicolas.marie@ensiie.eu> Date: Tue, 17 Oct 2023 12:43:33 +0200 Subject: [PATCH] fixe headers --- include/pass_mpi_collective.hpp | 9 ++++----- src/pass_mpi_collective.cpp | 18 +++++++++--------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/include/pass_mpi_collective.hpp b/include/pass_mpi_collective.hpp index a2b3d62..c95fcca 100644 --- a/include/pass_mpi_collective.hpp +++ b/include/pass_mpi_collective.hpp @@ -57,7 +57,9 @@ public: // MPI function / collectives detections bool is_func(gimple *stmt); + bool __is_mpi_func(gimple *stmt); bool is_mpi_func(gimple *stmt); + mpi_collective_code __is_mpi_collec(gimple *stmt); mpi_collective_code is_mpi_collec(gimple *stmt); // split blocks according to mpi collectives @@ -79,6 +81,8 @@ public: void free_edge_aux(function *fun); // loop detection + void __mark_edge_naif(function *fun); + void __mark_edge_naif(basic_block bb); void mark_edge(function *fun); // rank definition @@ -89,11 +93,6 @@ public: int __better_rank_collective(basic_block bb, mpi_collective_code mpi_code, int rank); -private: - // MPI function / collectives detections - bool __is_mpi_func(gimple *stmt); - mpi_collective_code __is_mpi_collec(gimple *stmt); - // GRAPHVIZ char *cfgviz_generate_filename(function *fun, const char *suffix); diff --git a/src/pass_mpi_collective.cpp b/src/pass_mpi_collective.cpp index 7da61f6..24b4b3d 100644 --- a/src/pass_mpi_collective.cpp +++ b/src/pass_mpi_collective.cpp @@ -66,8 +66,8 @@ unsigned int pass_mpi_collective::execute(function *fun) alloc_edge_aux(fun); mark_edge(fun); - //rank_collective(fun); - better_rank_collective(fun); + rank_collective(fun); + //better_rank_collective(fun); cfgviz_dump(fun, "_split"); @@ -399,29 +399,29 @@ void pass_mpi_collective::free_edge_aux(function *fun) } // naive version of mark_edge (work but Omax(2^n)) -void pass_mpi_collective::mark_edge_naif(function *fun) +void pass_mpi_collective::__mark_edge_naif(function *fun) { - mark_edge(ENTRY_BLOCK_PTR_FOR_FN(fun)); + __mark_edge_naif(ENTRY_BLOCK_PTR_FOR_FN(fun)); } -void pass_mpi_collective::mark_edge_naif(basic_block bb) +void pass_mpi_collective::__mark_edge_naif(basic_block bb) { edge e; edge_iterator ei; - ((bb_data *) bb->aux)->mark = 1; + ((bb_data *) bb->aux)->mark1 = 1; FOR_EACH_EDGE(e, ei, bb->succs) { - if (((bb_data *) e->dest->aux)->mark) + if (((bb_data *) e->dest->aux)->mark1) { ((edge_data *) e->aux)->loop = true; } else { - mark_edge(e->dest); + __mark_edge_naif(e->dest); } } - ((bb_data *) bb->aux)->mark = 0; + ((bb_data *) bb->aux)->mark1 = 0; } void pass_mpi_collective::mark_edge(function *fun) -- GitLab