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
4c8d48ca
Valider
4c8d48ca
rédigé
Il y a 6 ans
par
Thomas DILASSER
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
basic pdf
parent
a4c9b5df
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline
#1153
annulé
Il y a 6 ans
Étape : build
Étape : test
Modifications
2
Pipelines
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
functions/frontier.c
+8
-56
8 ajouts, 56 suppressions
functions/frontier.c
functions/frontier.h
+0
-1
0 ajout, 1 suppression
functions/frontier.h
avec
8 ajouts
et
57 suppressions
functions/frontier.c
+
8
−
56
Voir le fichier @
4c8d48ca
...
@@ -6,6 +6,7 @@ void bitmap_pdf(function * fun)
...
@@ -6,6 +6,7 @@ void bitmap_pdf(function * fun)
printf
(
"
\n
---PDF---
\n
"
);
printf
(
"
\n
---PDF---
\n
"
);
printf
(
"---------
\n
"
);
printf
(
"---------
\n
"
);
calculate_dominance_info
(
CDI_POST_DOMINATORS
);
bitmap_head
*
pfrontiers
;
bitmap_head
*
pfrontiers
;
basic_block
bb
;
basic_block
bb
;
pfrontiers
=
XNEWVEC
(
bitmap_head
,
last_basic_block_for_fn
(
fun
));
pfrontiers
=
XNEWVEC
(
bitmap_head
,
last_basic_block_for_fn
(
fun
));
...
@@ -15,46 +16,16 @@ void bitmap_pdf(function * fun)
...
@@ -15,46 +16,16 @@ void bitmap_pdf(function * fun)
bitmap_initialize
(
&
pfrontiers
[
bb
->
index
],
&
bitmap_default_obstack
);
bitmap_initialize
(
&
pfrontiers
[
bb
->
index
],
&
bitmap_default_obstack
);
}
}
td5_q1_
bitmap_post_dominance_frontiers
(
pfrontiers
,
fun
);
bitmap_post_dominance_frontiers
(
pfrontiers
,
fun
);
//FOR_ALL_BB_FN (bb, cfun)
FOR_ALL_BB_FN
(
bb
,
cfun
)
//{
// printf( "PDF Node %d: ", bb->index ) ;
// bitmap_print( stdout, &pfrontiers[bb->index], "", "\n" ) ;
//}
}
void
bitmap_post_dominance_frontiers
(
bitmap_head
*
frontiers
,
function
*
fun
)
{
edge
p
;
edge_iterator
ei
;
basic_block
b
;
FOR_EACH_BB_FN
(
b
,
fun
)
{
if
(
EDGE_COUNT
(
b
->
succs
)
>=
2
)
{
FOR_EACH_EDGE
(
p
,
ei
,
b
->
succs
)
{
basic_block
runner
=
p
->
dest
;
basic_block
pdomsb
;
if
(
runner
==
EXIT_BLOCK_PTR_FOR_FN
(
fun
))
continue
;
pdomsb
=
get_immediate_dominator
(
CDI_POST_DOMINATORS
,
b
);
while
(
runner
!=
pdomsb
)
{
{
if
(
!
bitmap_set_bit
(
&
frontiers
[
runner
->
index
],
b
->
index
))
printf
(
"PDF Node %d: "
,
bb
->
index
)
;
break
;
bitmap_print
(
stdout
,
&
pfrontiers
[
bb
->
index
],
""
,
"
\n
"
)
;
runner
=
get_immediate_dominator
(
CDI_POST_DOMINATORS
,
runner
);
}
}
}
free_dominance_info
(
fun
,
CDI_POST_DOMINATORS
);
}
}
}
void
bitmap_post_dominance_frontiers
(
bitmap_head
*
frontiers
,
function
*
fun
)
}
void
td5_q1_bitmap_post_dominance_frontiers
(
bitmap_head
*
frontiers
,
function
*
fun
)
{
{
edge
p
;
edge
p
;
edge_iterator
ei
;
edge_iterator
ei
;
...
@@ -64,40 +35,21 @@ td5_q1_bitmap_post_dominance_frontiers (bitmap_head *frontiers, function * fun)
...
@@ -64,40 +35,21 @@ td5_q1_bitmap_post_dominance_frontiers (bitmap_head *frontiers, function * fun)
{
{
if
(
EDGE_COUNT
(
b
->
succs
)
>=
2
)
if
(
EDGE_COUNT
(
b
->
succs
)
>=
2
)
// if (EDGE_COUNT (b->preds) >= 2)
{
{
FOR_EACH_EDGE
(
p
,
ei
,
b
->
succs
)
FOR_EACH_EDGE
(
p
,
ei
,
b
->
succs
)
// FOR_EACH_EDGE (p, ei, b->preds)
{
{
basic_block
runner
=
p
->
dest
;
basic_block
runner
=
p
->
dest
;
// basic_block runner = p->src;
basic_block
pdomsb
;
basic_block
pdomsb
;
if
(
runner
==
EXIT_BLOCK_PTR_FOR_FN
(
fun
))
if
(
runner
==
EXIT_BLOCK_PTR_FOR_FN
(
fun
))
// if (runner == ENTRY_BLOCK_PTR_FOR_FN (fun))
continue
;
continue
;
pdomsb
=
get_immediate_dominator
(
CDI_POST_DOMINATORS
,
b
);
pdomsb
=
get_immediate_dominator
(
CDI_POST_DOMINATORS
,
b
);
// pdomsb = get_immediate_dominator (CDI_DOMINATORS, b);
while
(
runner
!=
pdomsb
)
while
(
runner
!=
pdomsb
)
{
{
if
(
!
bitmap_set_bit
(
&
frontiers
[
runner
->
index
],
b
->
index
))
if
(
!
bitmap_set_bit
(
&
frontiers
[
runner
->
index
],
b
->
index
))
break
;
break
;
/*
if (1 == bitmap_bit_p(&frontiers[runner->index], b->index))
{
break;
}
else
{
bitmap_set_bit (&frontiers[runner->index], b->index);
cpt++;
printf("%d\n", cpt);
}
*/
runner
=
get_immediate_dominator
(
CDI_POST_DOMINATORS
,
runner
);
runner
=
get_immediate_dominator
(
CDI_POST_DOMINATORS
,
runner
);
// runner = get_immediate_dominator (CDI_DOMINATORS, runner);
}
}
}
}
}
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
functions/frontier.h
+
0
−
1
Voir le fichier @
4c8d48ca
...
@@ -2,5 +2,4 @@
...
@@ -2,5 +2,4 @@
#define __PDFDD__H
#define __PDFDD__H
void
bitmap_pdf
(
function
*
fun
);
void
bitmap_pdf
(
function
*
fun
);
void
bitmap_post_dominance_frontiers
(
bitmap_head
*
frontiers
,
function
*
fun
);
void
bitmap_post_dominance_frontiers
(
bitmap_head
*
frontiers
,
function
*
fun
);
void
td5_q1_bitmap_post_dominance_frontiers
(
bitmap_head
*
frontiers
,
function
*
fun
);
#endif
#endif
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