[llvm-dev] RFC: XRay in the LLVM Library

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 2 01:59:35 PST 2016


On 2 December 2016 at 07:15, Dean Michael Berris <dean.berris at gmail.com> wrote:
> I'd think of the analogy here as the conversion tool being clang that supports more than one programming language source code as input, but using a canonical LLVM IR representation (in-memory, or written out). While LLVM can handle backwards compatibility of the LLVM IR, it doesn't have to worry about clang supporting a new programming language.

That's how I understood.

Multiple languages, with potentially different semantics (like C and
Fortran), not different representations of the same semantics (like
textual and binary IR).

While it's possible to convert both C and Fortran to IR, that's a
complicated design cost that we take because we have to. Where we can,
we decided not to pay that cost, ie. having a single IR semantic
model, and guaranteeing that its multiple representations are
consistent and unique.

The translation of multiple formats (languages) should really be
separated in different front-ends to the underlying model engine,
which should only deal with a single, broad and well defined
representation.

cheers,
--renato


More information about the llvm-dev mailing list