[PATCH] D33865: Mark llvm.*annotation intrinsics as NoMem and Speculatable

Marek Olšák via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 3 08:51:52 PDT 2017


mareko created this revision.

We'd like to use them in AMD's Mesa OpenGL driver to mark certain intrinsic
calls in a hw-independent way, but we wouldn't like the annotation
intrinsics to disallow optimizations.


https://reviews.llvm.org/D33865

Files:
  include/llvm/IR/Intrinsics.td


Index: include/llvm/IR/Intrinsics.td
===================================================================
--- include/llvm/IR/Intrinsics.td
+++ include/llvm/IR/Intrinsics.td
@@ -568,15 +568,18 @@
 def int_var_annotation : Intrinsic<[],
                                    [llvm_ptr_ty, llvm_ptr_ty,
                                     llvm_ptr_ty, llvm_i32_ty],
-                                   [], "llvm.var.annotation">;
+                                   [IntrNoMem, IntrSpeculatable],
+                                   "llvm.var.annotation">;
 def int_ptr_annotation : Intrinsic<[LLVMAnyPointerType<llvm_anyint_ty>],
                                    [LLVMMatchType<0>, llvm_ptr_ty, llvm_ptr_ty,
                                     llvm_i32_ty],
-                                   [], "llvm.ptr.annotation">;
+                                   [IntrNoMem, IntrSpeculatable],
+                                   "llvm.ptr.annotation">;
 def int_annotation : Intrinsic<[llvm_anyint_ty],
                                [LLVMMatchType<0>, llvm_ptr_ty,
                                 llvm_ptr_ty, llvm_i32_ty],
-                               [], "llvm.annotation">;
+                               [IntrNoMem, IntrSpeculatable],
+                               "llvm.annotation">;
 
 //===------------------------ Trampoline Intrinsics -----------------------===//
 //


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33865.101319.patch
Type: text/x-patch
Size: 1383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170603/939ceb2f/attachment.bin>


More information about the llvm-commits mailing list