[llvm-commits] [llvm] r42768 - /llvm/trunk/include/llvm/Intrinsics.td

Dan Gohman djg at cray.com
Mon Oct 8 14:15:07 PDT 2007


Author: djg
Date: Mon Oct  8 16:15:07 2007
New Revision: 42768

URL: http://llvm.org/viewvc/llvm-project?rev=42768&view=rev
Log:
Mark the prefetch intrinsic as IntrWriteArgMem, instead of the
default of IntrWriteMem, to at least indicate that it doesn't
"capture" the argument pointer.

Modified:
    llvm/trunk/include/llvm/Intrinsics.td

Modified: llvm/trunk/include/llvm/Intrinsics.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=42768&r1=42767&r2=42768&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Intrinsics.td (original)
+++ llvm/trunk/include/llvm/Intrinsics.td Mon Oct  8 16:15:07 2007
@@ -153,8 +153,12 @@
                         GCCBuiltin<"__builtin_stack_save">;
 def int_stackrestore  : Intrinsic<[llvm_void_ty, llvm_ptr_ty]>,
                         GCCBuiltin<"__builtin_stack_restore">;
+// IntrWriteArgMem is more pessimistic than strictly necessary for prefetch,
+// however it does conveniently prevent the prefetch from being reordered
+// with respect to nearby accesses to the same memory.
 def int_prefetch      : Intrinsic<[llvm_void_ty, llvm_ptr_ty, 
-                                   llvm_i32_ty, llvm_i32_ty]>;
+                                   llvm_i32_ty, llvm_i32_ty],
+                                  [IntrWriteArgMem]>;
 def int_pcmarker      : Intrinsic<[llvm_void_ty, llvm_i32_ty]>;
 
 def int_readcyclecounter : Intrinsic<[llvm_i64_ty]>;





More information about the llvm-commits mailing list