<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Not saying I am totally understand how thing works, but I think you're misleading</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">by the DAG in the class name ScheduleDAGInstrs. I only see MachineInstrs</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">there, no SDNode. And the comment of ScheduleDAGInstrs says,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">  /// A ScheduleDAG for scheduling lists of MachineInstr.</font><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">One place mentioning DAG is relate to constructing the dependency of SUnit,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">i.e., Value2SUsMap.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Regards,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">chenwj</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-06-09 23:34 GMT+08:00 Xunhao Li (Alan, CRC) via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_415516022077746380WordSection1">
<p class="MsoNormal">Hi All,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am trying to construct a small optimization based on ScheduleDAGInstrs that does the following:<u></u><u></u></p>
<p class="m_415516022077746380MsoListParagraph"><u></u><span>1.<span style="font:7.0pt "Times New Roman"">     
</span></span><u></u>Find candidate nodes in the DAG, and speculatively modify the node (nodes).<u></u><u></u></p>
<p class="m_415516022077746380MsoListParagraph"><u></u><span>2.<span style="font:7.0pt "Times New Roman"">     
</span></span><u></u>After modification, try to compute the scheduled cycles of the region.<u></u><u></u></p>
<p class="m_415516022077746380MsoListParagraph"><u></u><span>3.<span style="font:7.0pt "Times New Roman"">     
</span></span><u></u>If the cycle number improves, go back to 1. to find the next candidate node.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am thinking using SchedulePostRATDList’s top-down algorithm to calculate the cycles needed for the region’s execution. However, it decomposes the schedule DAG while calculating the cycles --- In my case I want to keep the DAG so that
 we don’t need to construct it again in the following steps. <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">So my question is: is there a way (or API) to calculate the scheduled cycles needed for the region, without touching the DAG? Or is there a better way to do so in a ScheduleDAG? Did I missed something?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks in advance. Much appreciated.<u></u><u></u></p>
</div>
</div>

<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Wei-Ren Chen (陳韋任)<br>Homepage: <a href="https://people.cs.nctu.edu.tw/~chenwj" target="_blank">https://people.cs.nctu.edu.tw/~chenwj</a></div></div></div>
</div>