Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
M
MPI-compil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de conteneurs
Registre de modèles
Opération
Environnements
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Théotime DONNENFELD
MPI-compil
Validations
d1b54191
Valider
d1b54191
rédigé
Il y a 6 ans
par
Thomas DILASSER
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
MPI iterated PDF
parent
4c8d48ca
Branches
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline
#1157
annulé
Il y a 6 ans
Étape : build
Étape : test
Modifications
4
Pipelines
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
functions/aux_values.c
+1
-1
1 ajout, 1 suppression
functions/aux_values.c
functions/frontier.c
+193
-0
193 ajouts, 0 suppression
functions/frontier.c
functions/frontier.h
+6
-0
6 ajouts, 0 suppression
functions/frontier.h
plugin.cpp
+6
-1
6 ajouts, 1 suppression
plugin.cpp
avec
206 ajouts
et
2 suppressions
functions/aux_values.c
+
1
−
1
Voir le fichier @
d1b54191
...
...
@@ -23,7 +23,7 @@ void print_bb_aux(function * fun)
{
if
(
bb
->
aux
!=
NULL
&&
*
((
int
*
)
bb
->
aux
)
>=
0
)
{
printf
(
"bb aux value here : %i
\n
"
,
*
((
int
*
)
bb
->
aux
));
printf
(
"bb
%i
aux value here : %i
\n
"
,
bb
->
index
,
*
((
int
*
)
bb
->
aux
));
}
}
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
functions/frontier.c
+
193
−
0
Voir le fichier @
d1b54191
...
...
@@ -55,3 +55,196 @@ void bitmap_post_dominance_frontiers (bitmap_head *frontiers, function * fun)
}
}
}
void
bitmap_pdf_union
(
function
*
fun
)
{
printf
(
"
\n
---------
\n
"
);
printf
(
"---Union---
\n
"
);
printf
(
"---------
\n\n
"
);
//init
calculate_dominance_info
(
CDI_POST_DOMINATORS
);
bitmap_head
*
pfrontiers
;
basic_block
bb
;
pfrontiers
=
XNEWVEC
(
bitmap_head
,
last_basic_block_for_fn
(
fun
));
FOR_ALL_BB_FN
(
bb
,
cfun
)
{
bitmap_initialize
(
&
pfrontiers
[
bb
->
index
],
&
bitmap_default_obstack
);
}
bitmap_head
node_set
;
bitmap_initialize
(
&
node_set
,
&
bitmap_default_obstack
);
FOR_ALL_BB_FN
(
bb
,
cfun
)
{
bitmap_set_bit
(
&
node_set
,
bb
->
index
)
;
}
bitmap_head
pdf_set
;
bitmap_initialize
(
&
pdf_set
,
&
bitmap_default_obstack
);
bitmap_post_dominance_frontiers
(
pfrontiers
,
fun
);
bitmap_set_pdf_union
(
node_set
,
pfrontiers
,
&
pdf_set
,
fun
);
bitmap_print
(
stdout
,
&
pdf_set
,
"PDF Union: "
,
"
\n\n
"
)
;
free_dominance_info
(
fun
,
CDI_POST_DOMINATORS
);
}
void
bitmap_set_pdf_union
(
bitmap_head
node_set
,
bitmap_head
*
pdf
,
bitmap_head
*
pdf_set
,
function
*
fun
)
{
basic_block
bb
;
/* Create the union of each PDF */
FOR_ALL_BB_FN
(
bb
,
cfun
)
{
if
(
bitmap_bit_p
(
&
node_set
,
bb
->
index
)
)
{
bitmap_ior_into
(
pdf_set
,
&
pdf
[
bb
->
index
]
)
;
}
}
}
void
bitmap_iterated_pdf_union
(
function
*
fun
)
{
printf
(
"
\n
---------
\n
"
);
printf
(
"---Iterated---
\n
"
);
printf
(
"---------
\n\n
"
);
//init
calculate_dominance_info
(
CDI_POST_DOMINATORS
);
bitmap_head
*
pfrontiers
;
basic_block
bb
;
pfrontiers
=
XNEWVEC
(
bitmap_head
,
last_basic_block_for_fn
(
fun
));
FOR_ALL_BB_FN
(
bb
,
cfun
)
{
bitmap_initialize
(
&
pfrontiers
[
bb
->
index
],
&
bitmap_default_obstack
);
}
bitmap_head
node_set
;
bitmap_initialize
(
&
node_set
,
&
bitmap_default_obstack
);
FOR_ALL_BB_FN
(
bb
,
cfun
)
{
bitmap_set_bit
(
&
node_set
,
bb
->
index
)
;
}
bitmap_head
pdf_set
;
bitmap_initialize
(
&
pdf_set
,
&
bitmap_default_obstack
);
bitmap_post_dominance_frontiers
(
pfrontiers
,
fun
);
bitmap_set_pdf_union
(
node_set
,
pfrontiers
,
&
pdf_set
,
fun
);
bitmap_head
ipdf_set
;
bitmap_initialize
(
&
ipdf_set
,
&
bitmap_default_obstack
);
iterated_post_dominance
(
pdf_set
,
pfrontiers
,
&
ipdf_set
,
fun
);
printf
(
"
\n\n
Iterated PDF: "
)
;
bitmap_print
(
stdout
,
&
ipdf_set
,
""
,
"
\n\n
"
)
;
free_dominance_info
(
fun
,
CDI_POST_DOMINATORS
);
}
void
iterated_post_dominance
(
bitmap_head
pdf_node_set
,
bitmap_head
*
pdf
,
bitmap_head
*
ipdf_set
,
function
*
fun
)
{
basic_block
bb
,
b
;
bitmap_head
bitmap_tmp
,
bitmap_test
;
bitmap_initialize
(
&
bitmap_tmp
,
&
bitmap_default_obstack
);
bitmap_initialize
(
&
bitmap_test
,
&
bitmap_default_obstack
);
FOR_ALL_BB_FN
(
bb
,
fun
)
{
if
(
bitmap_bit_p
(
&
pdf_node_set
,
bb
->
index
)
)
{
bitmap_copy
(
&
bitmap_test
,
&
pdf_node_set
);
while
(
!
bitmap_equal_p
(
&
bitmap_tmp
,
&
bitmap_test
)
/*|| begin*/
)
{
bitmap_copy
(
&
bitmap_tmp
,
&
bitmap_test
);
FOR_ALL_BB_FN
(
b
,
fun
)
{
if
(
bitmap_bit_p
(
&
pdf
[
bb
->
index
],
b
->
index
))
{
bitmap_set_bit
(
&
bitmap_test
,
b
->
index
);
}
}
}
bitmap_copy
(
&
bitmap_test
,
ipdf_set
);
bitmap_ior
(
ipdf_set
,
&
bitmap_test
,
&
bitmap_tmp
);
}
}
}
void
bitmap_mpi_iterated_pdf_union
(
function
*
fun
)
{
printf
(
"
\n
---------
\n
"
);
printf
(
"---MPI Iterated---
\n
"
);
printf
(
"---------
\n\n
"
);
//init
calculate_dominance_info
(
CDI_POST_DOMINATORS
);
bitmap_head
*
pfrontiers
;
basic_block
bb
;
pfrontiers
=
XNEWVEC
(
bitmap_head
,
last_basic_block_for_fn
(
fun
));
FOR_ALL_BB_FN
(
bb
,
cfun
)
{
bitmap_initialize
(
&
pfrontiers
[
bb
->
index
],
&
bitmap_default_obstack
);
}
bitmap_head
node_set
;
bitmap_initialize
(
&
node_set
,
&
bitmap_default_obstack
);
FOR_ALL_BB_FN
(
bb
,
cfun
)
{
bitmap_set_bit
(
&
node_set
,
bb
->
index
)
;
}
bitmap_head
pdf_set
;
bitmap_initialize
(
&
pdf_set
,
&
bitmap_default_obstack
);
bitmap_post_dominance_frontiers
(
pfrontiers
,
fun
);
bitmap_set_pdf_union
(
node_set
,
pfrontiers
,
&
pdf_set
,
fun
);
bitmap_head
ipdf_set
;
bitmap_initialize
(
&
ipdf_set
,
&
bitmap_default_obstack
);
iterated_post_dominance
(
pdf_set
,
pfrontiers
,
&
ipdf_set
,
fun
);
bitmap_head
mpi_set
,
mpi_ipdf
;
bitmap_initialize
(
&
mpi_set
,
&
bitmap_default_obstack
);
bitmap_initialize
(
&
mpi_ipdf
,
&
bitmap_default_obstack
);
FOR_ALL_BB_FN
(
bb
,
cfun
)
{
if
(
bb
->
aux
!=
NULL
&&
*
((
int
*
)
bb
->
aux
)
>=
0
)
{
bitmap_set_bit
(
&
mpi_set
,
bb
->
index
)
;
}
}
//bitmap_set_pdf_intersect(ipdf_set, pfrontiers, &mpi_ipdf, fun);
bitmap_print
(
stdout
,
&
ipdf_set
,
"iterated PDF: "
,
"
\n\n
"
)
;
bitmap_and_into
(
&
ipdf_set
,
&
mpi_set
);
bitmap_print
(
stdout
,
&
ipdf_set
,
"MPI iterated PDF: "
,
"
\n\n
"
)
;
bitmap_print
(
stdout
,
&
mpi_set
,
"MPI set: "
,
"
\n\n
"
)
;
free_dominance_info
(
fun
,
CDI_POST_DOMINATORS
);
}
//void bitmap_set_pdf_intersect(bitmap_head node_set, bitmap_head *pdf, bitmap_head * pdf_set, function * fun)
//{
// basic_block bb;
//
// /* Create the union of each PDF */
// FOR_ALL_BB_FN( bb, fun )
// {
// if ( bitmap_bit_p( &node_set, bb->index ) && bb->aux !=NULL && *((int *)bb->aux)>=0)
// {
// bitmap_ior_into( pdf_set, &node_set ) ;
// }
// }
//
//
//}
Ce diff est replié.
Cliquez pour l'agrandir.
functions/frontier.h
+
6
−
0
Voir le fichier @
d1b54191
...
...
@@ -2,4 +2,10 @@
#define __PDFDD__H
void
bitmap_pdf
(
function
*
fun
);
void
bitmap_post_dominance_frontiers
(
bitmap_head
*
frontiers
,
function
*
fun
);
void
bitmap_set_pdf_union
(
bitmap_head
node_set
,
bitmap_head
*
pdf
,
bitmap_head
*
pdf_set
,
function
*
fun
);
void
bitmap_pdf_union
(
function
*
fun
);
void
iterated_post_dominance
(
bitmap_head
pdf_node_set
,
bitmap_head
*
pdf
,
bitmap_head
*
ipdf_set
,
function
*
fun
);
void
bitmap_iterated_pdf_union
(
function
*
fun
);
void
bitmap_mpi_iterated_pdf_union
(
function
*
fun
);
void
bitmap_set_pdf_intersect
(
bitmap_head
node_set
,
bitmap_head
*
pdf
,
bitmap_head
*
pdf_set
,
function
*
fun
);
#endif
Ce diff est replié.
Cliquez pour l'agrandir.
plugin.cpp
+
6
−
1
Voir le fichier @
d1b54191
...
...
@@ -109,12 +109,17 @@ class split_count_pass : public gimple_opt_pass
//writing corresponding MPI Call in corresponding basic block
edit_all_aux_value
(
fun
,(
int
*
)
NULL
);
write_mpi_code
(
fun
);
//
print_bb_aux(fun);
print_bb_aux
(
fun
);
/* Skip system header functions */
if
(
!
in_system_header_at
(
fun
->
function_start_locus
)
)
cfgviz_dump
(
fun
,
function_name
(
fun
),
1
)
;
//edit_all_aux_value(fun,(int*)LAST_AND_UNUSED_MPI_COLLECTIVE_CODE);
//write_mpi_code(fun);
bitmap_pdf
(
fun
);
bitmap_pdf_union
(
fun
);
bitmap_iterated_pdf_union
(
fun
);
bitmap_mpi_iterated_pdf_union
(
fun
);
return
0
;
}
};
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter