basic_block bb FILE file fopen home ars dumper txt FOR_EACH_BB bb if b

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*basic_block bb;
FILE *file = fopen("/home/ars/dumper.txt", "w");
FOR_EACH_BB(bb) {
if(bb != NULL) {
fprintf(file, "----dumper----dump_bb_info\n" );
dump_bb_info(bb, true, true, TDF_DETAILS, "", file);
gimple_stmt_iterator gsi;
for(gsi = gsi_start_bb(bb); !gsi_end_p(gsi); gsi_next(&gsi)) {
gimple stmt = gsi_stmt(gsi);
switch(gimple_code(stmt)) {
case GIMPLE_ASSIGN:
fprintf(file, "assign: \n" );
print_gimple_stmt(file, stmt, 0, TDF_SLIM);
break;
case GIMPLE_CALL:
fprintf(file, "call: \n" );
print_gimple_stmt(file, stmt, 0, TDF_SLIM);
break;
default:
fprintf(file, "stmt of another type\n");
}
//if (stmt != NULL) {
// fprintf(file, "----dumper----print_gimple_stmt:\n" );
// print_gimple_stmt(file, stmt, 0, TDF_SLIM);
//}
}
}
}*/