<div dir="ltr"><div>Hi Xiaoyi,<br><br></div>Do you still see this behavior after r177525?  I recently fixed several places where ordering was not propagated, including during legalization.  There are probably still cases that are missed, but I'd be interested in seeing a missed case.  I'm guessing it's a legalization that expands to multiple new nodes.  The AssignOrdering calls in the legalizer may need to be expanded to do the traversal you mention from SelectionDAGBuilder.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 26, 2013 at 11:00 PM, Guo, Xiaoyi <span dir="ltr"><<a href="mailto:Xiaoyi.Guo@amd.com" target="_blank">Xiaoyi.Guo@amd.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">It seems orderings are not assigned to DAG nodes created after the DAG builder, e.g., DAG nodes created during legalization. This causes instructions being scheduled in different order than source order for O0.<u></u><u></u></p>

<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">This is my plan to fix it:<u></u><u></u></p>
<p class="MsoNormal">Make a utility routine that recursively assign ordering to a chain of nodes, just like what SelectionDAGBuilder::AssignOrderingToNode() does.<u></u><u></u></p>
<p class="MsoNormal">Then add call to this utility routine at each routine that creates new DAG nodes after DAG builder to transfer the original node’s order to newly created node. If that routine creates a chain of nodes, then I only need to call  the utility
 routine for the last of the chain. There will be a lot of places to change. So I want to get agreement on the fix before I go ahead and make the changes.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Xiaoyi<u></u><u></u></p>
</div>
</div>

<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</div>