Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
gcc(特别是 C、C++ 和 Fortran 编译器)是否支持过程间分析以提高性能?如果是,哪些是相关标志?
http://gcc.gnu.org/wiki/InterProcedural说 gcc 将实现 IPA,但该页面已经过时了。
是的,它支持。在此处查看以 -fipa 开头的选项。最近的 gfortran 版本 (4.5+) 支持更复杂的优化类型 - 链接时优化 (LTO),它是跨文件的过程间优化。对应的编译器标志是 -flto。
PS 我在我的博客上写了一些关于 LTO的小系列文章。别客气!:-)