[M3devel] How to integrate llvm into cm3
Elmar Stellnberger
estellnb at elstel.org
Thu May 21 20:13:18 CEST 2015
Am 21.05.15 um 19:24 schrieb Rodney M. Bates:
>
> There are pros and cons. Integrating Peter's cm3-to-llvm conversion into
> the cm3 executable would be faster compiling--one fewer time per
> interface
> or module for the OS to create a process and run an executable. But it
> would also entail linking in this code, along with some of llvm's
> infrastructure,
> into cm3, making its executable bigger, with code that might not be
> executed
> at all, when a different backend is used. We already have the x86
> integrated
> backend and the C backend linked in to cm3, whether used or not.
>
> Anybody have thoughts on this? I suppose it could be set up to be fairly
> easily changed either way too.
>
Why not put each backend into a shared library and load it dynamically?
Are there still problems with shared libraries for some build targets?
On the other hand having cm3-IR handy and being able to translate
cm3-IR by an executable like m3cc into any desired target has proven
to be very handy for debugging as well as chocking the Modula-3
compiler on a new platform.
My personal preference would be to only have one default target
statically compiled in namely that on for cm3-IR and load all other
targets by a shared libarary dynamically. If that should fail for some
reason one can still use m3cc or one of its counterparts to
accomplish the translation process.
Elmar
More information about the M3devel
mailing list