From 20c788f2185ac3ad1e82a47c2f8869fb0d1c62b6 Mon Sep 17 00:00:00 2001
From: "nicolas.marie" <nicolas.marie@ensiie.eu>
Date: Thu, 19 Oct 2023 16:35:28 +0200
Subject: [PATCH] remove unused algos

---
 include/mpi_collective.hpp      |  3 --
 src/mpi_collective_warnings.cpp | 54 ---------------------------------
 2 files changed, 57 deletions(-)

diff --git a/include/mpi_collective.hpp b/include/mpi_collective.hpp
index fcd0282..9d8c9ee 100644
--- a/include/mpi_collective.hpp
+++ b/include/mpi_collective.hpp
@@ -118,9 +118,6 @@ public:
 	// functions that rank mpi collectives
 	void rank_collective(function *fun);
 	void __rank_collective(basic_block bb);
-	void better_rank_collective(function *fun);
-	int __better_rank_collective(
-	    basic_block bb, mpi_collective_code mpi_code, int rank);
 	// function that calculate agregate a mpi collective
 	// with the same rank in a bitmap
 	void get_mpi_coll_rank(
diff --git a/src/mpi_collective_warnings.cpp b/src/mpi_collective_warnings.cpp
index f163011..ec392e7 100644
--- a/src/mpi_collective_warnings.cpp
+++ b/src/mpi_collective_warnings.cpp
@@ -47,60 +47,6 @@ void pass_mpi_collective::__rank_collective(basic_block bb)
 	}
 }
 
-void pass_mpi_collective::better_rank_collective(function *fun)
-{
-	size_t i;
-	int next_rank = 0;
-
-	for (i = 0; i < LAST_AND_UNUSED_MPI_COLLECTIVE_CODE; ++i)
-	{
-		next_rank = __better_rank_collective(EXIT_BLOCK_PTR_FOR_FN(fun),
-		                                     (enum mpi_collective_code) i,
-		                                     next_rank);
-	}
-	reset_bb_mark(fun);
-}
-
-int pass_mpi_collective::__better_rank_collective(basic_block bb,
-    mpi_collective_code mpi_code, int rank)
-{
-	edge e;
-	edge_iterator ei;
-	int next_rank;
-
-	next_rank = rank;
-	((bb_data *) bb->aux)->mark1 = mpi_code + 1;
-
-	FOR_EACH_EDGE(e, ei, bb->preds)
-	{
-		if (((edge_data *) e->aux)->loop)
-		{
-			continue;
-		}
-
-		// cache or travell
-		if (((bb_data *) e->src->aux)->mark1 <= mpi_code)
-		{
-			next_rank =
-			    std::max(next_rank,
-			             __better_rank_collective(e->src, mpi_code, rank));
-		}
-		else
-		{
-			next_rank =
-			    std::max(next_rank,
-			             ((bb_data *) e->src->aux)->collective_rank[mpi_code]);
-		}
-	}
-	// set mpi code
-	if (((bb_data *) bb->aux)->mpi_code == mpi_code)
-	{
-		next_rank++;
-	}
-	((bb_data *) bb->aux)->collective_rank[mpi_code] = next_rank;
-	return next_rank;
-}
-
 void pass_mpi_collective::get_mpi_coll_rank(function *fun,
     int rank, int mpi_code, bitmap mpi_coll)
 {
-- 
GitLab