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.
精彩评论