Subject: Re: [boost] Interest in an LLVM library?
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-11-19 07:30:46
On 2015-11-19 04:41, Andy Jost wrote:
> Andrey Semashev wrote:
>> I'm not sure I understand the purpose of this library. It seems to build an AST
> It builds an intermediate representation of the program.
> LLVM is a top-of-the-line compiler infrastructure. It does many things incredibly well but, unfortunately, does not provide an expressive API for defining programs. The API it provides is far too low-level.
>> Is it just a wrapper for LLVM AST API?
> Essentially, yes. Though it's not really an AST, as discussed above. Like Boost.Python, this library makes the native API of some popular external library much easier (and more fun!) to use.
Thanks for the clarification. I wouldn't say Boost.Python is a fair
comparison though as it is a binding to another programming language.
This includes integrating C++ into Python as well as the other way around.
I think your proposed library is rather incomplete. I mean, tools for
building the intermediate bitcode are useful, but there has to be a way
to use that bitcode somehow in terms of the library. You refer to LLVM
API for that, but that immediately breaks the abstraction you've built
with your library.
Another question I had is this. Does your library only offer generation
of the intermediate bitcode or also something else? Does it offer tools
for traversal, analysis and transformation of the bitcode? Does it
support reading the (high-level) code from some sort of input? For
instance, can I build a static analyzer tool for C/C++ with your library?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk