site creation software
Mobirise

Customer Success Story

Compiler Service: Link Time Optimizer (LTO) pass in GCC

Summary

Helprack team developed one analysis pass and two optimization passes in the Link Time Optimizer(LTO) of GCC for a client, who wanted to upstream these passes to the GCC community.

Details

This customer wanted to implement a structure layout reorganization pass and a whole program global constant propagation pass, which could have helped improve the performance of a few SPEC benchmarks, notable amongst them being the mcf benchmark. In order to perform the structure reorganization, an Inter-Procedural Analysis (IPA) pass was necessary to determine if the structure in question would escape the compilation module. Thereafter, the customer wanted to delete any unused fields and reorder the remaining fields of the structure so as to minimize padding within the structure for all non-escaping structures. The customer also wanted to implement an inter-procedural analysis (IPA) pass to identify all cases of possible constant propagation where there was a single write operation of a constant followed by multiple read paths; then implement propagation of the constant across all those read paths. This was expected to be accomplished at a WHOle PRogram (WHOPR) level in the Link Time Optimizer (LTO). Helprack implemented these three passes in the LTO framework of GCC within a short period of time (3 months) and ensured that all the SPEC benchmarks were working flawlessly. The GCC community guidelines were adhered to in the code while ensuring that the patches were accepted by the community.

We can build similar optimization passes for you in GCC or LLVM, whether for open source contribution or your internal consumption.


 Read about other customer implementations.

Want to learn more? We love to hear from you.  Let's connect.