[LLVMdev] Question on Fence Instruction

Duan, Yue Lu duan11 at illinois.edu
Tue Oct 16 06:44:57 PDT 2012


Hi,

I have a question with the latest released LLVM which supports Fence Instruction as IR. Say if I intentionally place a Sequentially Consistent Fence Instruction somewhere in the code, then would the other transformation passes that applied later respect the Fence and do not perform any reordering across it?

Going further, if I place an SC Fence immediately after every load/store instruction, before any opt is done, and then apply those standard compile transformations, would the result code be SC-preserving? In other words, does the compiler restrict any reordering for potentially shared accesses that "protected" by these fences?

Thank you.

Yuelu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121016/cf5e161f/attachment.html>


More information about the llvm-dev mailing list