Hacker News new | ask | show | jobs
by lbenes 2459 days ago
> a natural question would be "why are you starting a GNAT LLVM project from scratch instead of building on top of DragonEgg?". If you want to know the answer, check the file README.dragonegg in the repository!

Correct me if I'm wrong, but from the README [1], the answer appears to be:

> The dragonegg plugin works with gcc 4.5, 4.6, 4.7 or 4.8

But a little more digging reveals that there are patches so[2]

> DragonEgg works for for GCC v8.x

Lack of Google-fu or am I missing something? If they believed dragonegg is flawed, why not just lay it out? I prefer that over a goose chase that doesn't fully check out.

[1] http://llvm.org/svn/llvm-project/dragonegg/trunk/README

[2] https://lists.llvm.org/pipermail/llvm-dev/2017-August/116705...

2 comments

Dragonegg was never a particularly well-maintained project. You're building a bridge between GCC's and LLVM's IR, which means you're highly susceptible to changes in one or the other, and the conversion tends to drop annotations (such as debugging info!). Most people only really cared about Dragonegg as a way to get Fortran code compiled to LLVM IR. Now that Flang exists, the Fortran motivation isn't there.

Essentially, Dragonegg was only ever a last-resort way to get LLVM IR. If you're trying to build a LLVM backend, you might as well emit LLVM IR directly from your frontend rather than trying to deal with a GIMPLE backend and then a GIMPLE-to-LLVM converter.

Arguments against DragonEgg are laid out in the gnat-llvm repo here: https://github.com/AdaCore/gnat-llvm/blob/master/README.drag...