My team and I are working on a procedural abstraction (PA) optimization for GCC based on the ARM Embedded Toolchain distribution that uses GCC 6.2.1. Our initial attempt to get something functional has been successful, but it is a very messy solution because we don't see a reasonable way to do an analysis of a compilation unit or whole program at the level or RTL. From what we have been able to gleen (note: we're all relative newcomers to the GCC code base), all RTL transformation and analysis is done at the level of functions only. Once pass_final runs, the RTL has been output to assembler, meaning no more changes to RTL is possible. We have not been able to find a reasonable way to collect all the RTL for a compilation unit to do an analysis across functions. Any solution we have come up with involves some serious changes to cgraphunit.c and final.c, among others. While we're willing to put in the effort to make these changes, we're wondering if anyone knows of something that would allow global RTL analysis without making large-scale changes. It seems as though the structure of the pass manager does not allow for this. The code structure suggests that we should either do an IPA pass on GIMPLE or we work as an assembler pass, thus forgoing work on RTL at all. Is this is what we should be doing? If anyone has some guidance here, it would be appreciated. -- Geoff

Reply via email to