免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2258 | 回复: 1
打印 上一主题 下一主题

请问下大家用什么编译器查看数据流图 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-07-02 13:01 |只看该作者 |倒序浏览
现在做编译中间优化,需要查看中间代码的数据流图,然后再做图优化。
LLVM只可以查看控制流图opt -view-cfg或opt -view-cfg-only,发现不了变量间的依赖关系。
看论文上说SUIF2可以,但是这个编译器太老了,要使用gcc2.95或2.96才能安装,感觉它已经落伍了,在各个版本上安装都不成功。
还有什么其它查看数据流图吗?GCC可以吗?
谢谢~

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 09:53:17
2 [报告]
发表于 2013-07-03 16:37 |只看该作者
本帖最后由 duanlin 于 2013-07-04 09:08 编辑

llvm 可以看数据流的,SelectionDAG里面控制流和数据流都有。

One great way to visualize what is going on here is to take advantage of a few LLC command line options. The following options pop up a window displaying the SelectionDAG at specific times (if you only get errors printed to the console while using this, you probably need to configure your system to add support for it).

•-view-dag-combine1-dags displays the DAG after being built, before the first optimization pass.
•-view-legalize-dags displays the DAG before Legalization.
•-view-dag-combine2-dags displays the DAG before the second optimization pass.
•-view-isel-dags displays the DAG before the Select phase.
•-view-sched-dags displays the DAG before Scheduling.

我没有关注细节,我使用这个命令行参数给llc后,

Writing 'C:/DOCUME~1/linduan/LOCALS~1/Temp/LLVM_12480/dag.main.dot'...  done.

生成了个ms office图标的文本文档。用什么graphxz?软件打开它可以看大概其。
要是想效果更好,文档说的可以弹出窗口显示图形的dag,这个我没试过。需要 configure your system ,你可以依此线索找到configure的办法,成了的话不妨单独发贴出来configure方法经验。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP