3 ms·
Godbolt is great, but you may as well just do it locally. For example, for clang or gcc, pass `-S` to output asm and `-g` for debug information, which will embe
by b3morales 5y ago
Godbolt is great, but you may as well just do it locally. For example, for clang or gcc, pass `-S` to output asm and `-g` for debug information, which will embed comments in the output to point back to the original source lines that generated that result.
Other compilers should have similar options -- this is what Godbolt is doing under the hood.
- CalChris 5y agoOf course you can do it locally. But you can share a Godbolt link. If you are asking or explaining something on StackExchange, Godbolt is the standard. You can document implementation decisions with Godbolt links in source code (LLVM 13 has 8 of them). You can share them on the Discord LLVM channels or in github reviews. You can examine how the assembly changes by release and optimization level with Godbolt. You compare GCC vs LLVM vs Intel vs ... You can look at how other targets work, arm64 vs x86_64 vs ....