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 conteneur
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é
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Théotime DONNENFELD
MPI-compil
Validations
a4c9b5df
Valider
a4c9b5df
rédigé
6 years ago
par
Thomas DILASSER
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Error testing
parent
f026a6f0
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline
#1152
annulé
6 years ago
Étape : build
Étape : test
Modifications
4
Pipelines
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
Makefile
+2
-1
2 ajouts, 1 suppression
Makefile
functions/frontier.c
+105
-0
105 ajouts, 0 suppression
functions/frontier.c
functions/frontier.h
+6
-0
6 ajouts, 0 suppression
functions/frontier.h
plugin.cpp
+3
-0
3 ajouts, 0 suppression
plugin.cpp
avec
116 ajouts
et
1 suppression
Makefile
+
2
−
1
Voir le fichier @
a4c9b5df
.PHONY
:
all
.PHONY
:
all
all
:
TEST1 TEST2 TEST3 TEST4 dot convert
#all: TEST1 TEST2 TEST3 TEST4 dot convert
all
:
TEST3 dot convert
TEST1
=
./tests/simple_test1.c
TEST1
=
./tests/simple_test1.c
TEST2
=
./tests/simple_test2.c
TEST2
=
./tests/simple_test2.c
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
functions/frontier.c
+
105
−
0
Voir le fichier @
a4c9b5df
#include
"frontier.h"
void
bitmap_pdf
(
function
*
fun
)
{
printf
(
"---------
\n
"
);
printf
(
"
\n
---PDF---
\n
"
);
printf
(
"---------
\n
"
);
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
);
}
td5_q1_bitmap_post_dominance_frontiers
(
pfrontiers
,
fun
);
//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
))
break
;
runner
=
get_immediate_dominator
(
CDI_POST_DOMINATORS
,
runner
);
}
}
}
}
}
void
td5_q1_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
)
// if (EDGE_COUNT (b->preds) >= 2)
{
FOR_EACH_EDGE
(
p
,
ei
,
b
->
succs
)
// FOR_EACH_EDGE (p, ei, b->preds)
{
basic_block
runner
=
p
->
dest
;
// basic_block runner = p->src;
basic_block
pdomsb
;
if
(
runner
==
EXIT_BLOCK_PTR_FOR_FN
(
fun
))
// if (runner == ENTRY_BLOCK_PTR_FOR_FN (fun))
continue
;
pdomsb
=
get_immediate_dominator
(
CDI_POST_DOMINATORS
,
b
);
// pdomsb = get_immediate_dominator (CDI_DOMINATORS, b);
while
(
runner
!=
pdomsb
)
{
if
(
!
bitmap_set_bit
(
&
frontiers
[
runner
->
index
],
b
->
index
))
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_DOMINATORS, runner);
}
}
}
}
}
Ce diff est replié.
Cliquez pour l'agrandir.
functions/frontier.h
+
6
−
0
Voir le fichier @
a4c9b5df
#ifndef __PDFDD__H
#define __PDFDD__H
void
bitmap_pdf
(
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
Ce diff est replié.
Cliquez pour l'agrandir.
plugin.cpp
+
3
−
0
Voir le fichier @
a4c9b5df
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
#include
"./functions/MPI_functions.c"
#include
"./functions/MPI_functions.c"
#include
"./functions/pragma.h"
#include
"./functions/pragma.h"
#include
"./functions/pragma.c"
#include
"./functions/pragma.c"
#include
"./functions/frontier.h"
#include
"./functions/frontier.c"
int
plugin_is_GPL_compatible
;
int
plugin_is_GPL_compatible
;
...
@@ -112,6 +114,7 @@ class split_count_pass : public gimple_opt_pass
...
@@ -112,6 +114,7 @@ class split_count_pass : public gimple_opt_pass
if
(
!
in_system_header_at
(
fun
->
function_start_locus
)
)
if
(
!
in_system_header_at
(
fun
->
function_start_locus
)
)
cfgviz_dump
(
fun
,
function_name
(
fun
),
1
)
;
cfgviz_dump
(
fun
,
function_name
(
fun
),
1
)
;
bitmap_pdf
(
fun
);
return
0
;
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