从GCC获取优化报告 [英] Getting an optimization report from GCC

查看:162
本文介绍了从GCC获取优化报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有一个选项可以与GCC一起使用,以获得编译器实际选择和执行的优化的详细报告。英特尔C编译器使用-opt-report可以实现这一点。我不想查看汇编文件并找出优化。我特别寻找循环展开和由编译器选择的循环平铺因子。

解决方案

尽管这不是一份报告的集合信息,您可以尝试使用gcc生成转储文件的 -fdump-ipa-all 选项,这至少让您不必分析汇编代码的发生。

关于循环优化, -fdump-rtl-loop2 选项可能很有用。

有关所有这些内容的详细信息,请参阅 3.9用于调试程序或GCC的选项


I would like to know if there is an option I can use with GCC to get a detailed report on the optimization actually chosen and performed by the compiler. This is possible with the Intel C compiler using the -opt-report. I do not want to look at the assembly file and figure out the optimization. I am specifically looking for the loop unrolling and loop tiling factors chosen by the compiler.

解决方案

Although it's not a report in the sense of aggregated information, you might try the -fdump-ipa-all option which makes gcc produce dump files which at least keep you from having to analyse assembler code on what happend.

Regarding loop optimzation the -fdump-rtl-loop2 option might be of interest.

For details on all this please see section 3.9 Options for Debugging Your Program or GCC of the manual.

这篇关于从GCC获取优化报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆