[LLVMdev] Prevent a intrinsic to be reordered?

Julio
Sun, 14 Sep 2008 17:52:37 -0000

Hello, I have an intrinsic that matches to a asm instruction directly. This
intrinsic starts a coprocessor that can do anything.

If I put another instruction next to it (a multiplication for example), the
"llc" reorders and puts the intrinsic after the multiplication.

I have tried all:
 - Setting the instruction like if it takes 256 cycles or 0 cycles.
 - Setting the instruction with "hasSideEffects" (which is ignored I
think)
 - Setting the instruction as a load, branch, call, etc....
 - ....

These later things are ignored, I don't know if when the intrinsic is
lowered, then it doesn't matter (or perhaps the reorder is made before).

Any clues?

Thanks.
Julio
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20080914/e2df53f8/attachment.html>