[M3devel] New llvm backend

Rodney M. Bates rodney_bates at lcwb.coop
Tue May 19 21:32:40 CEST 2015


I just noticed Peter's llvm backend in the github repository.
I'm glad to see it.  We need this.

I had started some work on this too, much of it complementary.
I have a version of cm3 that integrates an llvm backend, either
as a separate executable, or with (some of) llvm linked in.  I
will work on getting that set up for Peter's main program.

I also have done quite a bit of work on expanded bindings to more
llvm stuff, especially for building debug info, plus a few other
things that were missing from llvm's core interface.

I had started a cm3-IR to llvm-IR converter, but got bogged down
in making Modula-3's recursive definitions fit llvm's.  The latter
was not general enough for Modula-3, at least not in a direct way.
I did a lot on an algorithm to wrap a minimal set of pointers, each
in an artificial llvm struct, which is the only thing the llvm IR
allows forward declarations for.  Just when I had a pretty good draft
coded, some of the llvm folks announced that the typed pointers in
their IR were really unnecessary anyway, and reworked their head to
have pointers with no referent type.

Since that is most of what I had coded, I think it best to abandon
that and adopt Peter's.

I do think it would be good to have a branch for the llvm backend
work.  From what I have seen so far, git branches look to be pretty
easy to use.

-- 
Rodney Bates
rodney.m.bates at acm.org



More information about the M3devel mailing list