3 ms·
> That's a huge assumption I am not talking about optimizations that require understandings of the source language. But, for a simple example, a Pascal-ish lan
by rbehrends 13y ago
> That's a huge assumption
I am not talking about optimizations that require understandings of the source language. But, for a simple example, a Pascal-ish language may have the statement
x := (a+b)*(c+d)
compile into something like:
_t1 = a + b;
_t2 = c + d;
_t3 = _t1 * _t2;
x = _t3;
in order to simplify translation from an internal representation such as an AST. Putting such a piece of code back into human readable form makes the backend more complicated, while C compiler know how to optimize away the extraneous variables well.
Note that this is just one of many things that contribute to the verbosity of compiler output, not even necessarily a major one in this case.