run.dlang.io can now display ASM + AST + IR

Seb seb at wilzba.ch
Wed Feb 7 08:16:23 UTC 2018


On Wednesday, 7 February 2018 at 02:20:37 UTC, Kirr wrote:
> On Sunday, 14 January 2018 at 04:18:41 UTC, Seb wrote:
>>
>> 1) Assembly output
>
> This is great, thanks for this tool!
>
> Does it support using DMD's optimizer (-O)? I'd like to check 
> ASM
>  output of Bug 16189 with different compilers.

Yes, all CLI flags are supported.
-asm for DMD is the only virtual one because DMD doesn't support 
it out of the box (LDC supports -output-s), though to be fair DMD 
ships with obj2asm and ddemangle, so -asm is a trivial mapping to 
something like:

dmd -c "${args}[@]}"
obj2asm onlineapp.o | ddemangle

Also I recommend using -betterC when looking at the assembly as 
it won't generate a ModuleInfo and thus will lead to a shorter 
output.

Examples:

https://run.dlang.io/is/dawnVy

(add -inline here)

https://run.dlang.io/is/hDWDlI

(add -O here)




More information about the Digitalmars-d-announce mailing list