[LLVMdev] Behaviour of NVPTX intrinsic
Eli Bendersky
eliben at google.com
Tue Sep 30 09:20:37 PDT 2014
On Tue, Sep 30, 2014 at 9:04 AM, RAVI KORSA <ravi.korsa at gmail.com> wrote:
> is there any guarantee that the nvptx intrinsic "llvm.nvvm.barrier0" will
> not be moved around by opt ?
> In other words, can I expect all the instructions above
> "llvm.nvvm.barrier0" to remain above it and those below it to remain below,
> after all the opt passes are run ?
>
AFAIU, yes. Here's the definition:
def int_nvvm_barrier0 : GCCBuiltin<"__nvvm_bar0">,
Intrinsic<[], [], [IntrNoDuplicate]>;
Note that IntrNoDuplicate is the only intrinsic attribute. It has no other
attributes (like IntrNoMem) that would make it permissible for LLVM
optimizations to reorder things around it. By default, the optimizers would
not do this for function calls; only if these function calls are marked
with special attributes that permit this.
Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140930/94986b40/attachment.html>
More information about the llvm-dev
mailing list