November 09, 2022

Quick question since I'm new here and haven't really found anything on the topic yet:

Does LDC compile source code directly to LLVM IR to machine code, or are there other intermediate representations involved? I saw that LDC gives the options to output both MLIR and Assembly, but I haven't seen it mentioned otherwise.

November 09, 2022

On 9 Nov 2022, at 18:30, astrus via digitalmars-d-ldc wrote:

>

Does LDC compile source code directly to LLVM IR to machine code

Yes, from the DMD AST directly to LLVM IR, and then further to whatever desired output format (LLVM IR, assembly, object files, …) in-process using the standard LLVM tools.

— David