SPO600 2025 Winter Project - Stage 2: Plan and Approach (part1)
Introduction In Stage 2 of the SPO600 project, the goal is to implement a GCC compiler pass that detects cloned functions generated through Function Multi-Versioning (FMV) and determines whether they can be pruned. This process involves analyzing GIMPLE Intermediate Representation (IR) to compare the structural and semantic equivalence of these functions. This blog post provides an overview of the project scope, technical strategy, tools used, and implementation phases, based on extensive lecture notes, in-class guidance, and project documentation. Project Objective Create a GIMPLE-level analysis pass that: 1. Identifies cloned functions by their FMV naming conventions. 2. Extracts and compares GIMPLE representations of these functions. 3. Outputs a pruning recommendation based on structural equivalence. High-Level Workflow The project can be broken into three major parts: A. Find Cloned Functions - Functions created by FMV often have suffixes like `.resolver`, `.defau...