Project - Stage 3 : Initialised

Throughout this semester, We've been working on an enhancement to the GCC Compiler(reference
). We want to aim for implementing Automatic Function Multi-Versioning (AFMV) cloning. Essentially, AFMV cloning allows a compiler to automatically generate optimized versions of each function tailored to various CPU architectures, boosting performance without requiring manual attributes in the source code.
Two explored potential approaches are:
Modifying GCC's Internal Logic: Adjusting the compiler's built-in behavior to automatically perform AFMV cloning.
Attribute Injection: Adding a pass early in compilation that would insert the
target_clones
attribute into every function automatically.
After considerable exploration of the first approach by professor, We had been suggested that it may ran into significant challenges—especially encountering segmentation faults due to certain edge cases, such as non-local goto statements within GCC’s own codebase. Given the complexity and time constraints, We would move for the second approach.
Goal
Thus, for Stage III of this project, We'll focus to enhance the robustness and reliability of our existing compiler modifications through testing and validation. While AFMV automatic cloning remains a valuable goal, ensuring a stable, well-tested compiler environment will set the stage for future enhancements.
Subscribe to my newsletter
Read articles from Samarth Sharma directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Samarth Sharma
Samarth Sharma
Looping around thinking to write it down...