Wrapping Up Project : Stage 3
With the final stage of the SPO600 project, my journey into the GCC compiler comes to a close. This stage was all about tying up loose ends from Stage 2, testing the Clone-Pruning Analysis Pass, and reflecting on what I’ve learned throughout the project. Progress Overview The focus of Stage 3 was to finalize the work I started in Stage 2. Building on my earlier implementation, I managed to create a pass that iterates through functions, analyzes their GIMPLE representations, and outputs information to a dump file. Here's what my custom GCC pass can now do: Print Function Names : The pass successfully identifies and prints the names of all functions. Output GIMPLE Statements : It iterates through the GIMPLE representation of each function, printing the statements to the dump file. Count Statements : The pass tracks and stores the number of GIMPLE statements for each function. A snippet of my pass code from tree-ctyler.cc demonstrates the approach: unsigned int pass_ctyler::execute(fu...