[PATCH] memset 0 in obscure is optimized away by compiler
Harald Becker
ralda at gmx.de
Wed Apr 16 17:39:57 UTC 2014
Hi Rich !
>The quick loop will equally be optimized away, as neither it nor
>the memset have any observable effect.
What do you call observable? Replacing the content of a memory
region by a constant value is an observable effect by itself. The
only case I know is, filling an automatic variable at the end of
a function, when result of that variable is not used afterwards.
That is the compiler may optimize away the memory fill by it's
subexpression optimizer.
--
Harald
More information about the busybox
mailing list