I would love to see output of any intermediate language that Roc has, so that I can see the optimizations it has done.
Something like https://godbolt.org/
Is this possible somehow?
The --emit-llvm-ir
flag is what you want I believe
We've talked to the author of godbolt and he would like to add Roc to the website but we haven't had the time to set it up yet.
I have tried to convert the IR to C in order to inspect it more easily:
llc -march=c -o main.c main.ll
However it seems to not be valid?
llc: error: llc: main.ll:7:22: error: expected type
%str.RocStr = type { ptr, i64, i64 }
Do I need a particular version of the LLVM tools?
Currently on 10
:
llc --version
LLVM (http://llvm.org/):
LLVM version 10.0.0
Do I need a particular version of the LLVM tools?
Yes, we're on 16.0.6
Thanks!
Why does Ubuntu have to be so far behind! :rage:
I don't think llc
can output c
Just assembly
Which would be harder to read than llvm ir
Last updated: Jul 06 2025 at 12:14 UTC