J
Jan C. =?iso-8859-1?Q?Vorbr=FCggen?=
In embedded software, we frequently write to memory addresses that are
...which is the correct thing to do, IMO. If you want such dead stores or
loads to happen in any case, you need to tell the compiler the changed
semantics of that value in any case. In fact, on a modern processor, even
if the compiler did not optimize the memory operation away, it is quite
likely it wouldn't happen at all or in time.
Crippling the optimizer is the wrong solution to this problem.
Jan
in turn mapped to hardware control registers. Early optimizer design
was frequently done by software folk not familiar with this practices,
often optimizing out writes to address that they didn't see being
later read.
...which is the correct thing to do, IMO. If you want such dead stores or
loads to happen in any case, you need to tell the compiler the changed
semantics of that value in any case. In fact, on a modern processor, even
if the compiler did not optimize the memory operation away, it is quite
likely it wouldn't happen at all or in time.
Crippling the optimizer is the wrong solution to this problem.
Jan