[M3commit] [modula3/cm3] 9ee098: Add backend modes for standalone cm3-IR->llvm-IR t...

Rodney M. Bates rodney_bates at lcwb.coop
Fri Aug 7 04:55:27 CEST 2015

On 08/06/2015 04:28 PM, Jay wrote:
> Not contradicting this necessarily but I'd like a separate flag to indicate save the IR, even if it isn't being used.

Besides -keep?  Writing the cm3 IR, even when using a linked-in (to cm3) backend?
That would not be hard.

> And then, indeed contradicting this, I wonder if "mode" is the right parameter. Maybe we can have "pipeline" and user lists a sequence of functions to call?
> Heck, maybe we should have quake functions for:
>   save IR
>   convert IR file to C in-proc
>   convert IR file to LLVM IR
>   save LLVM IR to file
>   etc?
> Problem is that IR cannot be represented in quake?

In working on this, I've thought about a Cartesian factoring of the various
modes.  But there are already way more combinations than anybody has any
use for now, or even likely use.  It does get complicated, figuring out
the sequence of input and output file names, etc.  And it's full of stuff
to include files in various intermediate formats that were not produced
by the cm3 compiler.

>   - Jay
> On Aug 6, 2015, at 1:33 PM, Rodney Bates <rodney.m.bates at acm.org> wrote:
>>   Branch: refs/heads/master
>>   Home:   https://github.com/modula3/cm3
>>   Commit: 9ee0988a34e2ccfe8a0d95b9e12a249f8251be66
>>       https://github.com/modula3/cm3/commit/9ee0988a34e2ccfe8a0d95b9e12a249f8251be66
>>   Author: Rodney Bates <rodney.m.bates at acm.org>
>>   Date:   2015-08-06 (Thu, 06 Aug 2015)
>>   Changed paths:
>>     M m3-sys/cm3/src/Builder.m3
>>     M m3-sys/cm3/src/llvmdummy/LLGen.i3
>>     M m3-sys/cm3/src/llvmdummy/LLGen.m3
>>     M m3-sys/cm3/src/m3makefile
>>     M m3-sys/cm3/src/version.quake
>>     M m3-sys/cminstall/src/config-no-install/Unix.common
>>     M m3-sys/m3middle/src/Target.i3
>>   Log Message:
>>   -----------
>>   Add backend modes for standalone cm3-IR->llvm-IR translator executable.
>> On branch master
>> Changes to be committed:
>>     modified:   m3-sys/cm3/src/Builder.m3
>>     modified:   m3-sys/cm3/src/llvmdummy/LLGen.i3
>>     modified:   m3-sys/cm3/src/llvmdummy/LLGen.m3
>>     modified:   m3-sys/cm3/src/m3makefile
>>     modified:   m3-sys/cm3/src/version.quake
>>     modified:   m3-sys/cminstall/src/config-no-install/Unix.common
>>     modified:   m3-sys/m3middle/src/Target.i3
>> Add new backend modes StAloneLlvmAsm and StAloneLlvmObj.
>> These produce cm3-IR (.ic/.mc) in cm3, run "m3llvm" as a separate executable,
>> to translate to llvm-IR bitcode (.ib/.mb), run llc to compile that, and,
>> in the case of StAloneLlvmAsm, run asm separately.
>> _______________________________________________
>> M3commit mailing list
>> M3commit at elegosoft.com
>> https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3commit

Rodney Bates
rodney.m.bates at acm.org

More information about the M3commit mailing list