Posts

Showing posts from November, 2024

Building GCC again on aarch64-002

 Unfortunately the server I used to build gcc originally was aarch64-003 but that was shut down so I have to go through the process again on 002. The build time on the aarch64-002 server took 1 hour and 55 minutes approximately, I initially used time in my build command but I accidentally missed the information so I had to use stat build.log and find the duration of the build time by subtracting the final modification from the birth of the build.log file. Access: 2024-11-29 14:20:41.788188929 -0500 Modify: 2024-11-29 13:53:09.328736193 -0500 Change: 2024-11-29 13:53:09.328736193 -0500  Birth: 2024-11-29 11:57:40.960613010 -0500

Generating dumps with example.c

Image
 I created a quick "Example.c" program to test out gcc file dumps.  This program is very simple and takes two integers and returns the result, in this case the main function has 2 and 3 as arguments and will return 5.  In this part of the project, I worked on generating and analyzing GCC dump files for a small C program to gain insight into the different stages of code transformation and optimization within the compiler. The process involved using the -fdump-tree-all option, which produces detailed output files at various stages, each reflecting a unique part of the compilation pipeline. Starting with a simple example.c file containing an add function and a main function, I ran GCC with -fdump-tree-all. This command generated a series of dump files named with suffixes like .original, .gimple, .cfg, and .optimized. Each of these files represents a part of the program as it progresses through the compiler's internal stages, from raw code to fully optimized machine-read...