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

Jay jay.krell at cornell.edu
Fri Aug 7 06:48:56 CEST 2015


Clarification : I am often developing/debugging so "like" IR files.

 - Jay

On Aug 6, 2015, at 9:46 PM, Jay <jay.krell at cornell.edu> wrote:

> Gentle reminder that m3cgcat fills some of this. I believe it should subsume m3llvm. Or, really, cm3 with certain flags. I prefer fewer tools with more switches and fewer devolves to 1.
> 
> 
> Going through IR files is great for development and debugging, and then just inefficient and pointless when things are working.
> And for "license isolation".
> And *maybe* as a distribution or jit format.
> 
> 
> Yes, besides -keep, as that doesn't cause the files to get created.
> 
> 
> Thank you for agreeing. :)
> Yes some refactoring will be appreciated.
> 
> 
> I believe there really just meant to be 2
> bits- internal & external, producing assembly or object files.
> 
> 
> But we have multiple internal backends (3) and likely a desire to keep them all.
> So the original 2 bits don't suffice.
> 
> 
> I don't remember why I needed C to be a separate case, except maybe that -- to have multiple selectable internal backends.
> 
> 
> 
> - Jay
> 
> On Aug 6, 2015, at 7:55 PM, "Rodney M. Bates" <rodney_bates at lcwb.coop> wrote:
> 
>> 
>> 
>> 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