summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-10-08 21:15:07 +0000
committerDan Gohman <gohman@apple.com>2007-10-08 21:15:07 +0000
commitac546cc28f2edfd78071bff2adfaeeb98bd3c299 (patch)
tree2c3c4d41cca7e23bd48ebe49c32402b730f2cd8f /llvm
parent71c3c1c7151af49fe76073895e187a2809550f34 (diff)
downloadbcm5719-llvm-ac546cc28f2edfd78071bff2adfaeeb98bd3c299.tar.gz
bcm5719-llvm-ac546cc28f2edfd78071bff2adfaeeb98bd3c299.zip
Mark the prefetch intrinsic as IntrWriteArgMem, instead of the
default of IntrWriteMem, to at least indicate that it doesn't "capture" the argument pointer. llvm-svn: 42768
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Intrinsics.td6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/include/llvm/Intrinsics.td b/llvm/include/llvm/Intrinsics.td
index ef4f0961ed5..6b6b0f51d13 100644
--- a/llvm/include/llvm/Intrinsics.td
+++ b/llvm/include/llvm/Intrinsics.td
@@ -153,8 +153,12 @@ def int_stacksave : Intrinsic<[llvm_ptr_ty], [IntrReadMem]>,
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]>;
OpenPOWER on IntegriCloud