diff --git a/llvm/include/llvm/IR/Intrinsics.td b/llvm/include/llvm/IR/Intrinsics.td index 079ac61adef6e..1e243eb27b312 100644 --- a/llvm/include/llvm/IR/Intrinsics.td +++ b/llvm/include/llvm/IR/Intrinsics.td @@ -64,36 +64,42 @@ def Throws : IntrinsicProperty; class AttrIndex { int Value = idx; } -def FuncIndex : AttrIndex<-1>; def RetIndex : AttrIndex<0>; class ArgIndex : AttrIndex; +// Note: Properties that are applicable either to arguments or return values +// use AttrIndex. Properties applicable only to arguments use ArgIndex. Please +// refer to Attributes.td. + // NoCapture - The specified argument pointer is not captured by the intrinsic. -class NoCapture : IntrinsicProperty { +class NoCapture : IntrinsicProperty { int ArgNo = idx.Value; } -// NoAlias - The specified argument pointer is not aliasing other "noalias" pointer -// arguments of the intrinsic wrt. the intrinsic scope. +// NoAlias - The return value or the specified argument pointer is not aliasing +// other "noalias" pointer arguments of the intrinsic wrt. the intrinsic scope. class NoAlias : IntrinsicProperty { int ArgNo = idx.Value; } -// NoUndef - The specified argument is neither undef nor poison. +// NoUndef - The return value or specified argument is neither undef nor poison. class NoUndef : IntrinsicProperty { int ArgNo = idx.Value; } -// NonNull - The specified argument is not null. +// NonNull - The return value or specified argument is not null. class NonNull : IntrinsicProperty { int ArgNo = idx.Value; } +// Align - Alignment for return value or the specified argument. class Align : IntrinsicProperty { int ArgNo = idx.Value; int Align = align; } +// Dereferenceable -- Return value or the specified argument is dereferenceable +// upto `bytes` bytes in size. class Dereferenceable : IntrinsicProperty { int ArgNo = idx.Value; int Bytes = bytes; @@ -101,30 +107,30 @@ class Dereferenceable : IntrinsicProperty { // Returned - The specified argument is always the return value of the // intrinsic. -class Returned : IntrinsicProperty { +class Returned : IntrinsicProperty { int ArgNo = idx.Value; } // ImmArg - The specified argument must be an immediate. -class ImmArg : IntrinsicProperty { +class ImmArg : IntrinsicProperty { int ArgNo = idx.Value; } // ReadOnly - The specified argument pointer is not written to through the // pointer by the intrinsic. -class ReadOnly : IntrinsicProperty { +class ReadOnly : IntrinsicProperty { int ArgNo = idx.Value; } // WriteOnly - The intrinsic does not read memory through the specified // argument pointer. -class WriteOnly : IntrinsicProperty { +class WriteOnly : IntrinsicProperty { int ArgNo = idx.Value; } // ReadNone - The specified argument pointer is not dereferenced by the // intrinsic. -class ReadNone : IntrinsicProperty { +class ReadNone : IntrinsicProperty { int ArgNo = idx.Value; }