Project Stage 3 - Tide & Wrap
Intro This post will wrap up the project for SPO600 course. As a reminder; the goal of this project was to modify GCC Compiler to check if a cloned function can be pruned or not. However, I couldn't achieve the goal. Instead, I made a few small progresses. In this post, I will explain and wrap up the progresses that I made so far. Progress I made a few more changes from Stage 2. Actually this version is made by combining different versions of the pass implementations that I have made during this project. So it's not a huge progress: unsigned int pass_ctyler::execute(function *) { struct cgraph_node *node; int func_cnt = 0; int *stmt_counts = (int *)xmalloc(30 * sizeof(int)); FOR_EACH_FUNCTION(node) { int stmt_cnt = 0; if (dump_file) { if (node) { fprintf(dump_file, "Function Name === %s\n", node->name()); function *fn = node->get_fun(); if (fn) { ...