[PATCH] D31317: Change the default attributes for llvm.prefetch to enable optimization.

Eric Christopher via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 25 13:32:58 PDT 2017


echristo closed this revision.
echristo added a comment.

Given that this is the suggested direction from Hal originally I'm going to take Danny's LGTM as an OK.

Happy to pull back if Hal would like something different though.

Committed thusly:

echristo at athyra ~/s/llvm> git svn dcommit
Committing to https://llvm.org/svn/llvm-project/llvm/trunk ...
	A	test/Transforms/InstCombine/prefetch-load.ll
	M	include/llvm/IR/Intrinsics.td
	M	test/Bitcode/compatibility-3.6.ll
	M	test/Bitcode/compatibility-3.7.ll
	M	test/Bitcode/compatibility-3.8.ll
	M	test/Bitcode/compatibility-3.9.ll
	M	test/Bitcode/compatibility-4.0.ll
	M	test/Bitcode/compatibility.ll
Committed r298781

-eric



================
Comment at: include/llvm/IR/Intrinsics.td:334
 
-// IntrArgMemOnly 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_ptr_ty, llvm_i32_ty, llvm_i32_ty,
-                                   llvm_i32_ty],
-                                  [IntrArgMemOnly, NoCapture<0>]>;
+// IntrArgMemOrArgMemOnly is a little more pessimistic than strictly necessary
+// for prefetch, however it does conveniently prevent the prefetch from being
----------------
sanjoy wrote:
> Should the comment read `IntrInaccessibleMemOrArgMemOnly is a ...` ?
Yes it should I'm not sure how what's there happened. :)

Fixed locally.


https://reviews.llvm.org/D31317





More information about the llvm-commits mailing list