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.
我使用命令生成了转储输出文件-fdump-tree-all,-fdump-rtl-all并且得到了很多转储文件。我读过 GIMPLE 中的代码是伪 C 语法,而 RTL 转储文件级别太低而无法理解。有什么方法可以理解 GIMPLE 和 RTL 转储文件?任何可以将其转换为 C 代码或有用的软件?有什么教程可以学习理解吗?谢谢
-fdump-tree-all
-fdump-rtl-all
最好的方法(对我来说)是转储一些示例并自己理解发出的代码。这并不难,与原始代码有一些变化(比如循环转换为 if 和 goto),gcc 中有很多传递,我的建议是转储你需要的东西。就我而言,我经常使用以下命令:
-fdump-tree-lower -fdump-tree-cfg -fdump-tree-ssa -fdump-tree-optimized (it's the last pass before going into rtl passes)
rtl 几乎是不可压缩的,需要对该方言有很好的理解