GCC Newspaper
OCTOBER 6, 2026
gsoc — Proposed

GSoC: possible IPA-ICF project direction

Proposal for a GSoC project to inventory and improve ICF's equivalence checks for function merging, especially for template instantiations.

Rohith Kapelli, a GCC contributor with several merged patches, proposes a Google Summer of Code project focused on improving GCC’s Interprocedural Function Cloning (IPA-ICF) pass. The project aims to identify and address limitations in ICF’s current equivalence checks, which sometimes miss information or incorrectly merge functions, impacting optimization. The goal is to enhance ICF’s ability to safely merge functions, particularly template instantiations, leading to better code size and performance.

In the Thread 1 participant
  1. Rohith Kapelli <kapellirohith@gmail.com> proposer

    Proposes a GSoC project to thoroughly inventory and classify properties ICF needs for function merging, addressing current misses and improving safety.

    “This led me to a possible GSoC project: build a complete inventory of the properties ICF needs to compare, including properties it currently misses, and classify each one as harmless if it differs, something that can be made conservative, or something that must block the merge.”

In Details

This proposal outlines a GSoC project for GCC's Interprocedural Analysis (IPA) - Inter-function Cloning (ICF) pass. The core issue is that ICF's equivalence checks (e.g., equals_wpa) sometimes fail to preserve or identify critical information when merging functions, leading to suboptimal or incorrect code. The project aims to systematically catalog the properties ICF should consider (like array bounds, symbol information), classify them (harmless difference, conservative handling, merge-blocking), and develop targeted tests. This work is crucial for improving optimization gains from functio…

For Context
IPA
Interprocedural Analysis. A compiler analysis technique that examines information across function boundaries to enable optimizations.
ICF
Inter-function Cloning. An optimization pass that duplicates identical functions to reduce code size and improve instruction cache utilization, by merging them into a single copy.
GSoC
Google Summer of Code. An annual program where Google funds open-source projects to sponsor student developers.
libstdc++
The C++ standard library implementation used with GCC.
LTO
Link-Time Optimization. A compile-time optimization that allows the compiler to optimize code across multiple source files during the linking stage.
SSA
Static Single Assignment. An intermediate representation in compilers where every variable is assigned a value exactly once.
text segment
The .text section in an executable file, containing the compiled machine code.
Filed Under: GCCoptimizationIPAICFGSoC