下一步, 就是从 GIMPLE 到 RTL 了. 这些部分我了解的比较少了. 这里涉及到一些, 像是寄存器分配、合并指令、去除死代码、去掉无意义的 jump、指令重排之类的 pass. 具体可以参考这里. 给编译器传递 -fdump-rtl-all 的选项可以打印出全体 RTL pass 的输出. 编译器后端岗位倒是很多人在做, 主要是很多新的芯...
gcc hello.c gcc -fdump-tree-all 低级GIMPLE execute_pass_list (cfun, g->get_passes ()->all_lowering_passes); 具体执行passes.def,具体执行的pass和参数配置相关 PASS类型 tree /* Optimization pass type. */ enum opt_pass_type { GIMPLE_PASS, RTL_PASS, //RTL为处理对象 SIMPLE_IPA_PASS, IPA...
-dletters -dumpspecs -dumpmachine -dumpversion -fdump-unnumbered -fdump-translation-unit[-n] -fdump-class-hierarchy[-n] -fdump-tree-original[-n] -fdump-tree-optimized[-n] -fdump-tree-inlined[-n] -feliminate-dwarf2-dups -feliminate-unused-debug-types -feliminate-unused-debug-symbols -fmem...
-fdollar-ok 允许在实体名中使用美元符号 -fdump-core 不起作用。为向前兼容保留的选项。 -fdump-fortran-optimized Display the code tree after front end optimization -fdump-fortran-original 解析后显示代码树 -fdump-parse-tree Display the code tree after parsing; deprecated option -fexternal-blas 为大...
#define will show all the predefined macros. If you use-dMwithout the-Eoption,-dMis interpreted as a synonym for-fdump-rtl-mach. Reference:https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-dM-953
[GCC@localhosttest]$ ~/paag-gcc/host-i686-pc-linux-gnu/gcc/cc1 -fdump-tree-all -fdump-rtl-alltest.c [GCC@localhosttest]$ lstest.c*test.ctest.c.123t.optimizedtest.c.168r.asmconstest.c.001t.tutest.c.125t.blockstest.c.171r.subregs_of_mode_inittest.c.003t.originaltest.c.126t....
本节书摘来自华章出版社《深入分析GCC 》一书中的第2章,第2.4节,作者 王亚刚 ,更多章节内容可以访问云栖社区“华章计算机”公众号查看。 2.4 shell工具及graphviz绘图工具 为了更好地分析GCC的运行过程,可以使用GCC支持的一些编译选项,例如,-fdump-tree-all、-fudmp-ipa-all、-fdump-rtl-all等,这样编译过程中将产...
比如,嵌套的作用域和表达式。 可以使用选项 -fdump-tree-gimple得到类C的GIMPLE表达形式 如下面程序: intmain() {inta;if(a) {intb; b = 2 + a + b; }return0; } 使用该选项得到的转换成C语言形式的GIMPLE中间表示为: main() {intD.1593;intD.1594;inta;if(a != 0)goto<D.1591>;elsegoto<D...
寄存器分配问题在GCC中存在很久,一直没有得到很好的解决。现在这个分支已经合并到了GCC 4.4.0中。如果使用-fdump-rtl-all-all来转储(dump)tree级的中间过程,则可以看到*.ira文件。Vladimir在GCC Summit 2007上有一篇文章《The integrated register allocator for GCC》,介绍了相关的工作。
rtl-pass_name -fdisable-rtl-pass-name=range-list -fdisable-tree-pass_name -fdisable-tree-pass-name=range-list -fdump-noaddr -fdump-unnumbered -fdump-unnumbered-links -fdump-translation-unit[-n] -fdump-class-hierarchy[-n] -fdump-ipa-all -fdump-ipa-cgraph -fdump-ipa-inline -fdump-passes...