[PATCH] D19471: [TLI] Mark memset_pattern16 params nocapture.

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 12:10:42 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL267760: [InferAttrs] Mark memset_pattern16 params nocapture. (authored by ab).

Changed prior to commit:
  http://reviews.llvm.org/D19471?vs=54809&id=55283#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19471

Files:
  llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
  llvm/trunk/test/Transforms/InferFunctionAttrs/annotate.ll

Index: llvm/trunk/test/Transforms/InferFunctionAttrs/annotate.ll
===================================================================
--- llvm/trunk/test/Transforms/InferFunctionAttrs/annotate.ll
+++ llvm/trunk/test/Transforms/InferFunctionAttrs/annotate.ll
@@ -25,7 +25,7 @@
 
 declare void @memset_pattern16(i8*, i8*, i64)
 ; CHECK: declare void @memset_pattern16(i8*, i8*, i64)
-; CHECK-POSIX: declare void @memset_pattern16(i8*, i8* readonly, i64) [[G2:#[0-9]+]]
+; CHECK-POSIX: declare void @memset_pattern16(i8* nocapture, i8* nocapture readonly, i64) [[G2:#[0-9]+]]
 
 declare i32 @gettimeofday(i8*, i8*)
 ; CHECK-POSIX: declare i32 @gettimeofday(i8* nocapture, i8* nocapture) [[G0:#[0-9]+]]
Index: llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
+++ llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
@@ -690,6 +690,8 @@
   //case LibFunc::memset_pattern8:
   case LibFunc::memset_pattern16:
     Changed |= setOnlyAccessesArgMemory(F);
+    Changed |= setDoesNotCapture(F, 1);
+    Changed |= setDoesNotCapture(F, 2);
     Changed |= setOnlyReadsMemory(F, 2);
     return Changed;
   // int __nvvm_reflect(const char *)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19471.55283.patch
Type: text/x-patch
Size: 1251 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160427/e4f06f3e/attachment.bin>


More information about the llvm-commits mailing list