[SAoC] MLIR Support for LDC
Roberto Rosmaninho
Robertogrosmaninho at gmail.com
Wed Sep 25 13:30:20 UTC 2019
On Wednesday, 25 September 2019 at 10:42:46 UTC, Stefanos
Baziotis wrote:
> IMO, it's better to keep updates on one thread (e.g. your
> presentation thread).
> That way, one can open only one thread and see all the history.
>
All right, I'll keep updating this thread them, thanks!
> So, if you just want to print something for debugging purposes,
> you can just use printf. However, I would recommend getting
> used to
> Logger utilities.
> . . .
>
> There is also -vv which has a weird description but basically
> means: "Info
> for the LDC developers that care about the internal things that
> happen".
>
> You can see these and all the other options here [2]
>
> You probably want the second, -vv. Since we're on the subject,
> the other
Thanks a lot!! It'll make my work much easier!!
> thing you probably will like is -output-ll which outputs the
> LLVM IR.
> You may even end up to put a specific flag for MLIR. But for
> the time being,
> seeing the LLVM IR I think will help.
Yeah! The plan is to have a -output-mlir at the end of the
project!
> Lastly, the usual workflow for LDC is Johan's workflow [3].
This workflow makes sense even for this project that I still have
to change a lot of files to get some output, just to know if I'm
crashing something. Thanks again!
> Note: `ninja` builds the whole LDC suite. Most of the time,
> you'll want to only rebuild the ldc2 binary. You can do that
> with `ninja ldc2`.
> So, when you do a change on a single file, you want to do
> `ninja ldc2`. Trust me,
> this is day and night in how much time it takes to compile.
This seems powerful due the huge time to compile LDC just because
of single modification. I'll try it!
> Unfortunately, I can't give you any info about MacOS because I
> have not used
> one for any serious programming. I _think_ David Nadlinger
> uses Mac but I may very well be wrong.
I have set up my project on Ubuntu as well, so if you know
something about debugging on Linux and can explain it in greater
detail it'll help anyway!
> Lastly, make sure you have read this page [4] and that you have
> installed
> LLVM and LDC with -DCMAKE_BUILD_TYPE=RelWithDebInfo. And bear
> in mind
> that LDC debug info is not the best :).
Done!
> Best of luck,
> Stefanos Baziotis
>
Thanks again,
Roberto Rosmaninho
More information about the Digitalmars-d
mailing list