Posts

Showing posts from April, 2024

PROJECT STAGE 3 - Understanding GCC Garbage Collection Test Cases in gcc.dg

Introduction Briefly introduce the significance of garbage collection in compilers and its role in ensuring memory efficiency and correctness in generated code. Overview of Test Cases Provide an overview of the test cases found in the gcc/gcc/testsuite/gcc.dg directory. Mention that these test cases cover various aspects of garbage collection, including loop optimizations, function inlining, and memory management.  Analysis of Selected Test Cases 1. loop-1.c /* Copyright (C) 2000 Free Software Foundation. Simplified from gcc/fold-const.c by Alexandre Oliva <oliva@lsd.ic.unicamp.br> */ /* { dg-do compile } */ void mul_double () { int i , j , * prod ; for ( i = 0 ; i < 4 ; i ++ ) { for ( j = 0 ; j < 4 ; j ++ ) { * prod = 0 ; } } } This test case is designed to evaluate loop optimization in GCC. It contains nested loops with a simple assignment statement inside. However, there's a critical issue: the prod p...

PROJECT STAGE 2 - DejaGNU Testing Framework

Image
Introduction to DejaGnu Testing Framework What is DejaGnu? In the world of software development, testing is a critical phase that ensures the quality and reliability of software before it reaches the end user. DejaGnu is a framework designed to facilitate the testing of software applications, providing developers with a robust environment for running tests across various platforms. Built on top of the Expect programming language, which in turn utilizes Tcl (Tool Command Language), DejaGnu offers a powerful and flexible way to automate the execution of test suites and manage test results. The Origins and Purpose of DejaGnu Developed initially by Rob Savoye and others at Cygnus Solutions, DejaGnu has grown to become a favored tool for testing by many in the open-source community. Its primary goal is to provide a consistent interface for writing and running tests, making it easier for developers to test their applications on different hosts and target platforms. This cross-platform capabi...

PROJECT STAGE 1

Getting started:  -Obtain the source code for the current development version of GCC from the Git repository. git clone git://gcc.gnu.org/git/gcc.git  cd gcc   - To build GCC outside of the source tree to keep things clean, build directory was created by following command: mkdir build Configure the build for each of two environments. It sets up the build to create a compiler. -Build GCC. Run make to start the compilation process. Task 1  Prune Cloned Functions (a) Specific, Relevant Sections of the GCC Code Base The relevant sections of the GCC codebase to prune cloned functions can be found in the files where function versioning and cloning are handled. This includes: gcc/function.c for managing functions. gcc/config/aarch64/aarch64.c for configuring AArch64. gcc/tree-vect-loop.c, or similar files, for vectorization and cloning logic. (b) Work Detail It is involved in the identification of cloned functions in AFMV, which do not offer enough improvements in performan...