Skip to content
Extraits de code Groupes Projets
Valider 33760857 rédigé par Nicolas MARIE's avatar Nicolas MARIE
Parcourir les fichiers

fixe split_block function

parent 27dea056
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -134,18 +134,25 @@ void pass_mpi_collective::split_blocks(function *fun)
basic_block bb;
gimple_stmt_iterator gsi;
gimple *stmt;
gimple *prev_stmt;
size_t nb_collective;
bool split;
FOR_EACH_BB_FN(bb, fun)
{
nb_collective = 0;
for (gsi = gsi_start_bb(bb); !gsi_end_p(gsi); gsi_next(&gsi))
stmt = NULL;
split = false;
for (gsi = gsi_start_bb(bb); !gsi_end_p(gsi) && ! split; gsi_next(&gsi))
{
prev_stmt = stmt;
stmt = gsi_stmt(gsi);
if (is_mpi_collec(stmt) != LAST_AND_UNUSED_MPI_COLLECTIVE_CODE)
{ ++nb_collective; }
if (nb_collective >= 2)
{ split_block(bb, stmt); }
++nb_collective;
if (nb_collective >= 2){
split_block(bb, prev_stmt);
split = true;
}
}
}
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter