<div dir="ltr">Maybe I missed the point. But from the email, it is not clear to me what is the reason that what scheduler does is not good. We will need to decide on the solution after we understand the reason that the reordering is incorrect.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 15, 2016 at 5:13 PM, Ryan Taylor via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I have the same issue, would it be easier and more useful to attach a flag to the instruction to tell the scheduler not to move instructions across this boundary?</div><div><br></div><div>-Ryan</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 15, 2016 at 5:11 PM, Krzysztof Parzyszek via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You can create a DAG mutation that adds artificial dependencies between A, B and Z.<br>
<br>
-Krzysztof<span><br>
<br>
<br>
On 11/15/2016 3:26 PM, Wei Ding via llvm-dev wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><span>
Hello,<br>
<br>
I have a LLVM backend question regarding how to prevent compiler from<br>
reordering instructions. For example, I have the following instructions.<br>
Z_instruction is the one which I want to insert.<br>
<br>
<br>
// instruction order which I am looking for<br>
//////////////////////////////<wbr>///////////<br>
A_instruction<br>
B_instruction<br>
<br></span>
*Z_instruction*<br>
<br>
C_instruction<br>
D_instruction<br>
E_instruction<br>
F_instruction<br>
<br>
*Z_instruction*<span><br>
<br>
G_instruction<br>
F_instruction<br>
<br>
<br>
==============================<wbr>====================<br>
<br>
But I found compiler reordered those instructions like the following.<br></span>
How could I prevent compiler from moving *A_instruction* and<br>
*B_instruction* after the first *Z_instruction*? Any recommendations and<span><br>
suggestion are greatly appreciated here!!!<br>
<br></span>
*Z_instruction*<br>
*<br>
*<span><br>
A_instruction<br>
B_instruction<br>
<br>
C_instruction<br>
D_instruction<br>
E_instruction<br>
F_instruction<br>
<br></span>
*Z_instruction*<br>
<br>
G_instruction<br>
F_instruction<br>
<br>
BTW, I have define input/output chain for : *C_instruction,<br>
D_instruction, E_instruction, F_instruction and Z_instruction*<br>
*<br>
*<span><br>
Thank you so much!<br>
<br>
--<br>
Wei Ding<br>
<br>
<br></span>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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><span class="m_4260363027206683392HOEnZb"><font color="#888888">
</font></span></blockquote><span class="m_4260363027206683392HOEnZb"><font color="#888888">
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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>
</font></span></blockquote></div><br></div>
</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></div>