<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 8/1/2012 10:20 AM, Alex Rønne
Petersen wrote:<br>
</div>
<blockquote
cite="mid:CAEnAdhbra+iqYEgmAmYsRCft+R25PtAaofXOy344SPNoDpFAfg@mail.gmail.com"
type="cite">
First, the value of c.i is read and saved into a
compiler-generated
temporary. Then, d.i is set to this temporary. Then the temporary
is
incremented and stored into c.i.
I can only guess, but is the problem you're trying to point out
that
there might be multiple reads from c.i depending on the compiler
implementation? If so, I already mentioned that this is
insignificant:
Excessive reads have no impact on semantics, but writes do.
</blockquote>
<br>
I've seen memory mapped I/O where the read cycles <b>were</b>
important (they were destructive reads).<br>
<br>
And yes, i++ can be (and sometimes is) done with multiple reads.<br>
<br>
> Which is how almost all compiler IRs do it. You'll rarely find
compiler IRs that don't use explicit load and store instructions.<br>
<br>
See dmd :-)<br>
<br>
<br>
</body>
</html>