下一步, 就是从 GIMPLE 到 RTL 了. 这些部分我了解的比较少了. 这里涉及到一些, 像是寄存器分配、合并指令、去除死代码、去掉无意义的 jump、指令重排之类的 pass. 具体可以参考这里. 给编译器传递 -fdump-rtl-all 的选项可以打印出全体 RTL pass 的输出. 编译器后端岗位倒是很多人在做, 主要是很多新的芯...
gcc hello.c -fdump-tree-gimple 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...
-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 为大...
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
fdump-lang-switch -fdump-lang-switch-options -fdump-lang-switch-options=filename -fdump-passes -fdump-rtl-pass -fdump-rtl-pass=filename -fdump-statistics -fdump-tree-all -fdump-tree-switch -fdump-tree-switch-options -fdump-tree-switch-options=filename -fcompare-debug[=opts] -fcompare-debug...
-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...
[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的运行过程,可以使用GCC支持的一些编译选项,例如,-fdump-tree-all、-fudmp-ipa-all、-fdump-rtl-all等,这样编译过程中将产生大量的中间运行结果信息,帮助用户理解GCC的处理细节。另外,用户也可以根据需要在源代码中增加适当的调试代码,从而输出一些运行时的中间信息。对这些输出结果进行高效分析,从中...
$ gcc -fdump-rtl-expand main.c $ ls a.out main.c main.c.229r.expand Usage usage: cally.py [-h] [-d] [-f [FUNCTION]] [--callee FUNCTION] [--caller FUNCTION] [-e REGEX] [--no-externs] [--no-warnings] [--max-depth DEPTH] RTLFILE [RTLFILE ...] positional arguments: ...
比如,嵌套的作用域和表达式。 可以使用选项 -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...