Project Stage 1: Create a Basic GCC Pass
After performed Lab4, at this stage we create a pass for the current development version of the GCC compiler which: Iterates through the code being compiled; Prints the name of every function being compiled; Prints a count of the number of basic blocks in each function; and Prints a count of the number of gimple statements in each function. Step 1: Prepare Environment I already have ~/SomeLocalDir: GCC source code directory ~/gcc-build-001: GCC build directory (where I ran configure). ~/gcc-test-001:Installation directory Step 2: Create a New GCC Pass Go to the GCC source directory: cd ~/SomeLocalDir/gcc Create my-pass.cc file: nano hxu_pass.cc #include "config.h" #include "system.h" #include "coretypes.h" #include "tree.h" #include "tree-pass.h" #include "cgraph.h" #include "function.h" #include "basic-block.h" #include "...