> On Tue, 2014-01-14 at 12:31 +0000, Brian Drummond wrote:
> 
> > A few supplementary questions, if it's OK to ask:
> 
> One further question for Tristan:
> 
> You've commented a few times that the LLVM backend (or rather the
> LLVM
> IR) doesn't support nested subprograms, and you planned to use the
> same
> mechanism used for processes to work around that ... sounds like a
> lot
> of work...
> 
> But that would mean LLVM can't support Ada either : is there anything
> to
> learn from looking at Ada LLVM compilers?
> 
> A quick search for which shows this project :
> http://dragonegg.llvm.org/
> which uses LLVM as a gcc plugin... this would support the idea that
> LLVM
> isn't up to supporting Ada directly.

AFAIK, as a plugin, it reuses of passes of gcc, including the unnesting
pass.

> Now, building the dragonegg compiler with a vhdl-enabled gcc might be
> a
> tool to test LLVM with (it can emit LLVM IR instead of native code)
> but
> clearly doesn't satisfy the main goal of moving to LLVM : bypassing
> the
> excruciating gcc build process!

Indeed.  Plus I am mostly interested in the JIT feature of LLVM.

> There was partial support for nested functions (and taking their
> addresses via trampolines) in LLVM 2.2 and 2.4, for x86 and x86_64
> targets, according to
> http://llvm.org/releases/2.4/docs/ReleaseNotes.html
> but I can't find more recent info atm...

Trampolines are remotely related to nested subprograms: this is a
way to indirectly (via a pointer) call a nested subprogram using
the same convention that a top-level subprogram.  But we don't
need that in GHDL.

> The Draco project
> http://www.dragonlace.net/questions/quest_004/
> must be facing the same difficulty.
> I've been in touch with John Marino before, perhaps it might be worth
> my
> asking him about how Draco approaches the problem of nested
> subprograms?

Unnesting subprograms isn't that complex.  All the machinery is
already in translate.

Tristan.

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to