diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-12 01:12:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-12 01:12:03 +0000 |
commit | a62c302ddd79c525d6fac050974911d36662ebfe (patch) | |
tree | b892a6de9b6f64d5a5edbe35d3fec4e4850d29e8 /include | |
parent | c3443718540c6662f7502feb76849cf816baaa9f (diff) | |
download | external_llvm-a62c302ddd79c525d6fac050974911d36662ebfe.zip external_llvm-a62c302ddd79c525d6fac050974911d36662ebfe.tar.gz external_llvm-a62c302ddd79c525d6fac050974911d36662ebfe.tar.bz2 |
add nocapture attribute to llvm.mem* intrinsics and have tblgen
parse them. tblgen doesn't yet do anything with this info though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Intrinsics.td | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td index a641caa..8145700 100644 --- a/include/llvm/Intrinsics.td +++ b/include/llvm/Intrinsics.td @@ -51,6 +51,11 @@ def IntrWriteMem : IntrinsicProperty; // Commutative - This intrinsic is commutative: X op Y == Y op X. def Commutative : IntrinsicProperty; +// NoCapture - The specified argument pointer is not captured by the intrinsic. +class NoCapture<int argNo> : IntrinsicProperty { + int ArgNo = argNo; +} + //===----------------------------------------------------------------------===// // Types used by intrinsics. //===----------------------------------------------------------------------===// @@ -199,17 +204,18 @@ def int_stackprotector : Intrinsic<[llvm_void_ty], //===------------------- Standard C Library Intrinsics --------------------===// // -let Properties = [IntrWriteArgMem] in { - def int_memcpy : Intrinsic<[llvm_void_ty], - [llvm_ptr_ty, llvm_ptr_ty, - llvm_anyint_ty, llvm_i32_ty]>; - def int_memmove : Intrinsic<[llvm_void_ty], - [llvm_ptr_ty, llvm_ptr_ty, - llvm_anyint_ty, llvm_i32_ty]>; - def int_memset : Intrinsic<[llvm_void_ty], - [llvm_ptr_ty, llvm_i8_ty, - llvm_anyint_ty, llvm_i32_ty]>; -} +def int_memcpy : Intrinsic<[llvm_void_ty], + [llvm_ptr_ty, llvm_ptr_ty, llvm_anyint_ty, + llvm_i32_ty], + [IntrWriteArgMem, NoCapture<0>, NoCapture<1>]>; +def int_memmove : Intrinsic<[llvm_void_ty], + [llvm_ptr_ty, llvm_ptr_ty, llvm_anyint_ty, + llvm_i32_ty], + [IntrWriteArgMem, NoCapture<0>, NoCapture<1>]>; +def int_memset : Intrinsic<[llvm_void_ty], + [llvm_ptr_ty, llvm_i8_ty, llvm_anyint_ty, + llvm_i32_ty], + [IntrWriteArgMem, NoCapture<0>]>; // These functions do not actually read memory, but they are sensitive to the // rounding mode. This needs to be modelled separately; in the meantime |