GSoC: possible IPA-ICF project direction
Rohith Kapelli proposes a 350-hour GSoC project to improve IPA-ICF's function merging logic by addressing limitations in equivalence checks.
Following up on previous work on GCC’s Interprocedural constant folding (IPA-ICF), Rohith Kapelli proposes a 350-hour Google Summer of Code project. The project aims to address limitations in ICF’s equivalence checks that lead to missed or improperly preserved information when functions are merged, particularly impacting template instantiations in libstdc++.
- proposer
Proposes a 350-hour GSoC project to improve IPA-ICF, following up on previous patches and identifying limitations in current equivalence checks.
“I'll follow up in the next few days with a more concrete technical plan and a few questions for Honza on the parts that need his judgement.”
- reviewer
Acknowledges the proposal and expresses satisfaction with the direction, indicating it makes sense for a GSoC project.
Technical Tradeoffs
- Balancing the thoroughness of ICF equivalence checks against the potential performance overhead of more complex analysis.
In Details
This GSoC proposal addresses limitations in GCC's Interprocedural Analysis (IPA) framework, specifically within the Invalidate Code Folding (ICF) pass. The proposer found that ICF's equivalence checking (sem_function::equals_wpa and func_checker) can miss or mishandle information across merged functions, impacting optimizations for cases like libstdc++ template instantiations. The proposal seeks to refine these checks or explore alternative strategies for robust function merging.
- IPA-ICF
- Interprocedural Analysis - Invalidate Code Folding. A GCC optimization pass that identifies identical functions and merges them to reduce code size and improve cache performance.
- GSoC
- Google Summer of Code. An annual program that offers student developers stipends to contribute to open-source projects.
- libstdc++
- The standard C++ library implementation used by GCC.
- LTO
- Link-Time Optimization. An optimization technique that allows the compiler to optimize code across multiple source files during the linking stage.
- RTL
- Register Transfer Language. An intermediate representation used by GCC to represent code during optimization.
- SSA
- Static Single Assignment. An intermediate representation property where each variable is assigned a value exactly once.