[LLVMdev] LLVM + Eclipse?

Renato Golin rengolin at systemcall.org
Wed Dec 16 01:41:30 PST 2009

2009/12/16 Talin <viridia at gmail.com>:
> So, suppose I wanted to create an Eclipse plugin that could read an LLVM
> bitcode file. What would be the best way to bridge between the Java and C++
> worlds? I thought about calling llvm-dis as a subprocess and then parsing
> the output, but that seems fragile to me. I'd rather deal with the API level
> if possible.

Hi Talin,

You'd still have to use Java to create the plugin and, unless you
write a new llvm-dis in Java, there no way you get a clean API.

AFAICS, What you can do is re-write llvm-dis (it's just a small cpp
file) but using JNI calls rather than the main(), and use that from
your plugin.

What are your goals with this plugin? It'd be nice to edit the IR,
send it to the back-end or JIT, compile it back to C and re-edit, for
code that is hard to optimize. But just visualizing the code would be
good enough, especially if you can select the optimization levels
seamlessly or even have three panels, one with each level to compare
(maybe using Eclipse's diff utility).

Looking forward to use the plugin! ;)



Reclaim your digital rights, eliminate DRM, learn more at

More information about the llvm-dev mailing list