[M3devel] gcc vs. clang as back-end

Tony Hosking hosking at cs.purdue.edu
Fri Jun 25 17:46:39 CEST 2010


Hi Michael,

CM3 has a front-end compiler written in Modula-3 that targets an M3-specific IR.  Currently, that M3 IR is parsed and compiled by a simple front-end to gcc to generate assembler.  It's not clear that Clang itself is the way to go.  Rather, I think it would be better to build a translator from M3 IR to LLVM IR.

It would be much more effort to build a whole new M3 front-end around Clang.  Or do I misunderstand your suggestion?

-- Tony

Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484




On 25 Jun 2010, at 11:07, Michael Richter wrote:

> I've just read Jay K's long message about problems integrating with gcc 4.5.  The LLVM project has clang out now which is ready for prime time as a C or Objective-C compiler (not yet there for C++, but that's out of scope for CM3 I'd guess).  Since clang was specifically designed, as one of its goals, to be easy to use as a form of library, would it not perhaps be better to start using clang as a back-end instead of any version of gcc (which is notoriously difficult to write front-ends, back-ends or tools for)?
> 
> -- 
> "Perhaps people don't believe this, but throughout all of the discussions of entering China our focus has really been what's best for the Chinese people. It's not been about our revenue or profit or whatnot."
> --Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100625/eec7d029/attachment-0002.html>


More information about the M3devel mailing list