[llvm-dev] how to prevent LLVM back-end from reordering instructions at instruction scheduling?
Wei Ding via llvm-dev
llvm-dev at lists.llvm.org
Tue Nov 15 13:26:09 PST 2016
Hello,
I have a LLVM backend question regarding how to prevent compiler from
reordering instructions. For example, I have the following instructions.
Z_instruction is the one which I want to insert.
// instruction order which I am looking for
/////////////////////////////////////////
A_instruction
B_instruction
*Z_instruction*
C_instruction
D_instruction
E_instruction
F_instruction
*Z_instruction*
G_instruction
F_instruction
==================================================
But I found compiler reordered those instructions like the following. How
could I prevent compiler from moving *A_instruction* and *B_instruction*
after the first *Z_instruction*? Any recommendations and suggestion are
greatly appreciated here!!!
*Z_instruction*
A_instruction
B_instruction
C_instruction
D_instruction
E_instruction
F_instruction
*Z_instruction*
G_instruction
F_instruction
BTW, I have define input/output chain for : *C_instruction, D_instruction,
E_instruction, F_instruction and Z_instruction*
Thank you so much!
--
Wei Ding
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161115/96d48ade/attachment.html>
More information about the llvm-dev
mailing list