开发者

Tool for gcc GIMPLE modification?

I need to add to gcc support of an OpenMP-like (directive) language. I know it is possible to dump GIMPLE code and then "undump" it and continue compilation. I want to modify the dumped DIMPLE to add calls of my dy开发者_运维知识库namic library, modify variables, and so on. Is there any handy tool to do this?

EDIT: Perhaps LLVM is what I need. Currently I am interested in how to transform GIMPLE to LLVM IR. Also, is there a way to get information what line of source code corresponds to concrete operator of IR?


Depends on what you exactly need, you might be able to do this using GCC Plugins.


GIMPLE => LLVM IR translator is called "llvm-gcc" (or DragonEgg if you want a GCC plugin). The standard way of storing the map between lines of source language and something in LLVM IR is via emission of the debug information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜