It's not very discoverable but there are sister sites for Rust, Go and D:<p><a href="https://rust.godbolt.org/" rel="nofollow">https://rust.godbolt.org/</a>
<a href="https://go.godbolt.org/" rel="nofollow">https://go.godbolt.org/</a>
<a href="https://d.godbolt.org/" rel="nofollow">https://d.godbolt.org/</a>
I would like to point out that compiler explorer is very easy to extend with other toolchains and that Matt Godbolt is a very nice person.<p>I extended Godbolt's Gcc Explorer adding other toolchains (Motorola 68000 and MIPS, built with crosstools-ng) beside the standard AMD64 one, and released as a Docker image.<p>I did this because... I had to read and write M68k code for a class, and having GCC generate code for me (with -O0 and the colourisation feature) was the easiest way to get some code to read, besides the very basic examples)<p>In case you have to work with MIPS or M68K, you can find my "version" here: <a href="https://hub.docker.com/r/esantoro/acso-explorer/" rel="nofollow">https://hub.docker.com/r/esantoro/acso-explorer/</a><p>IIRC, the bundled gcc is version 4.9.something
This is a fabulous tool for exploring micro-optimizations across a range of CPUs.<p>I've used it for investigating how some inner loops get pipelined across AVR, ARM+Thumb, ARM32, ARM64, PowerPC, x86-32, and x86-64 processors.
This site is so handy -- if it's useful to you too please Flattr the author so they can continue to host it. It's been a helpful tool to be able to link people to code+assembly when trying to convince people not to "optimize" code in code reviews :).
Excellent!<p>LLVM used to have an online compiler page but IIRC they took it down due to security concerns.<p>Of course I have a couple of suggestions ;) :<p>What this needs is synchronized scrolling ala <a href="http://stackoverflow.com/questions/21410675/getting-the-original-variable-name-for-an-llvm-value" rel="nofollow">http://stackoverflow.com/questions/21410675/getting-the-orig...</a><p>And would be nice if it can show intermediate steps (the AST, the IR) in parallel or show different optimisation levels beside each other too.
Some of the examples are broken because they use C++ language constructs but they're being compiled as C code, which leads to error messages like:<p><pre><code> 13 : error: 'static_cast' undeclared (first use in this function)
input = static_cast<int*>(__builtin_assume_aligned(input, 64));
^</code></pre>
Suggestion: Add a switch to show C/C++ code lines next to the created assembly. This is very helpful for learning.<p>In gdb you can get this with disassemble /m, or with objdump -S.<p>Helped me a lot in the past.
Great tool! I sometimes do the same locally to check out language behaviour, but most of the time it's just one compiler. This tool lets me see compiler differences and the evolution between compiler versions. Nice.
I've used this to help friends fudge their CS homework in a CS class.<p>It's an assembly class that's impossible since you aren't taught, so they can write their labs in C and decompile it to make it easy.