From aa3bfd61480bde974fa129db1229dd9e9104f93e Mon Sep 17 00:00:00 2001
From: "thomas.dilasser" <thomas.dilasser@ensiie.fr>
Date: Mon, 22 Oct 2018 10:02:22 +0200
Subject: [PATCH] bug fix graph

---
 functions/MPI_functions.c | 3 ++-
 plugin.cpp                | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/functions/MPI_functions.c b/functions/MPI_functions.c
index d2a44d5..b5e80e5 100644
--- a/functions/MPI_functions.c
+++ b/functions/MPI_functions.c
@@ -13,11 +13,12 @@ void write_mpi_code(function * fun)
                         mpi_collective_code *current_enum = (mpi_collective_code*)xmalloc(sizeof (mpi_collective_code));
 
                         *current_enum = get_mpi_code(stmt);
+			//printf("current_enum : %i\n",*((int*)current_enum));
                         if (*current_enum != LAST_AND_UNUSED_MPI_COLLECTIVE_CODE)
                         {
                                 edit_aux_value(bb,(int*)current_enum);
 
-                        }
+                        }			
                 }
 
         }
diff --git a/plugin.cpp b/plugin.cpp
index 687fd70..dbc7287 100755
--- a/plugin.cpp
+++ b/plugin.cpp
@@ -104,7 +104,9 @@ class split_count_pass : public gimple_opt_pass
 			//split bb where we find several MPI calls
 			split_mpi_block(fun);
 			//writing corresponding MPI Call in corresponding basic block
+			edit_all_aux_value(fun,(int*)NULL);
 			write_mpi_code(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 ) ;
-- 
GitLab