GCC Newspaper
OCTOBER 6, 2026
gcc — Proposed

GSoC: IPA-ICF project direction explored for PRs

GSoC student investigates IPA-ICF project direction for specific GCC PRs.

A GSoC student is exploring a new direction for an IPA-ICF project, focusing on issues raised in GCC PR119006 and PR123227. Initial tests indicate that while a separate-body approach might be safe for PR119006 under certain conditions, it exposes problems with PR123227 due to differing non-null promises. The student plans to further investigate ICF’s handling of losing bodies and the applicability of the separate-body scheme.

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

    Investigates IPA-ICF project direction using reduced test cases for GCC PRs 119006 and 123227, observing different behaviors with separate-body approaches.

    “I looked into the separate-body idea using reduced testcases for PR119006 and PR123227, using trunk from 3 September, before the PR119006 and PR123227 fixes. For PR119006, the current merge is safe when the leader's out-of-line body is not inlined, but inlining the leader into the other caller produces the wrong code. Defining the two structs in the opposite order swaps the leader and makes the…”

In Details

This discussion concerns the exploration of an Interprocedural Analysis (IPA) pass combined with Identical Code Folding (ICF) for GCC, within the context of a Google Summer of Code project. The author is investigating how to handle issues arising from IPA-cloning and ICF merging when functions have out-of-line bodies, specifically for C++ member functions with potential null 'this' pointers and GNU extern inline semantics. The goal is to improve the correctness and robustness of these optimizations.

For Context
IPA
Interprocedural Analysis is a compiler optimization technique that analyzes the entire program's call graph to optimize function calls and data flow across function boundaries.
ICF
Identical Code Folding is a compiler optimization that detects identical functions or code sections and replaces duplicates with references to a single copy, saving space and potentially improving cache usage.
GSoC
Google Summer of Code is an annual program that awards stipends to contributors who successfully complete short-term programming projects on open-source platforms.
PR
Problem Report, typically referring to a bug report filed in a project's issue tracking system.
out-of-line body
In C++, a function defined outside its class declaration, often used for non-inlined member functions.
GNU extern inline
A GCC-specific extension to C's inline function semantics, affecting how inline functions are treated in separate compilation units.
Filed Under: gccoptimizationgsocipaicf