diff --git a/include/mpi_collective.hpp b/include/mpi_collective.hpp
index fcd02820725c5ac81d94ec92e04163d1c9396d7f..9d8c9eee2f4d8087afe9f6b6077bd49fdc94fc71 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 f1630118f7082d245e1f670e94749589052b8d36..ec392e78fccbf33cc4d510b345f58b62862a4d71 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)
 {