<div>Thank Duncan for your patient explaining. It gives me a great help to read source </div>
<div>code of  ISellowering and  selectionDAG and  ISelDAG</div>
<div> </div>
<div>Thanks<br><br> </div><br>
<div><span class="gmail_quote">2009/12/6, Duncan Sands <<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<span class="q"><br><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">1 What side effects do operatios of  loads/stores/calls/returns have? (maybe i don't understand concept of side effect )<br>
</blockquote><br></span>suppose you do a store to a memory location, and then load from the<br>memory location.  This is not the same as first doing the load and<br>then only afterwards doing the store!  How to represent the order in the<br>
SDAG?  The SDAG is not a linear sequence of instructions like LLVM IR<br>in a basic block.  In the SDAG things are related only via "uses", eg:<br>node A uses a result of node B.  So to represent order relationships<br>
(this load must occur after that store), nodes are given an additional<br>artificial result (the "chain"), just so it can be used by another node.<br>So store nodes have a result, the chain, which can be used by a load.<br>
As a general rule, if node A uses a result of node B, then B has to be<br>executed before A.  This, if a load uses the chain result of a store,<br>then the load will occur after the store.<br><br>Ciao,<br><span class="sg"><br>
Duncan.<br></span></blockquote></div><br>