@@ -64,67 +64,73 @@ def Throws : IntrinsicProperty;
64
64
class AttrIndex<int idx> {
65
65
int Value = idx;
66
66
}
67
- def FuncIndex : AttrIndex<-1>;
68
67
def RetIndex : AttrIndex<0>;
69
68
class ArgIndex<int argNo> : AttrIndex<!add(argNo, 1)>;
70
69
70
+ // Note: Properties that are applicable either to arguments or return values
71
+ // use AttrIndex. Properties applicable only to arguments use ArgIndex. Please
72
+ // refer to Attributes.td.
73
+
71
74
// NoCapture - The specified argument pointer is not captured by the intrinsic.
72
- class NoCapture<AttrIndex idx> : IntrinsicProperty {
75
+ class NoCapture<ArgIndex idx> : IntrinsicProperty {
73
76
int ArgNo = idx.Value;
74
77
}
75
78
76
- // NoAlias - The specified argument pointer is not aliasing other "noalias" pointer
77
- // arguments of the intrinsic wrt. the intrinsic scope.
79
+ // NoAlias - The return value or the specified argument pointer is not aliasing
80
+ // other "noalias" pointer arguments of the intrinsic wrt. the intrinsic scope.
78
81
class NoAlias<AttrIndex idx> : IntrinsicProperty {
79
82
int ArgNo = idx.Value;
80
83
}
81
84
82
- // NoUndef - The specified argument is neither undef nor poison.
85
+ // NoUndef - The return value or specified argument is neither undef nor poison.
83
86
class NoUndef<AttrIndex idx> : IntrinsicProperty {
84
87
int ArgNo = idx.Value;
85
88
}
86
89
87
- // NonNull - The specified argument is not null.
90
+ // NonNull - The return value or specified argument is not null.
88
91
class NonNull<AttrIndex idx> : IntrinsicProperty {
89
92
int ArgNo = idx.Value;
90
93
}
91
94
95
+ // Align - Alignment for return value or the specified argument.
92
96
class Align<AttrIndex idx, int align> : IntrinsicProperty {
93
97
int ArgNo = idx.Value;
94
98
int Align = align;
95
99
}
96
100
101
+ // Dereferenceable -- Return value or the specified argument is dereferenceable
102
+ // upto `bytes` bytes in size.
97
103
class Dereferenceable<AttrIndex idx, int bytes> : IntrinsicProperty {
98
104
int ArgNo = idx.Value;
99
105
int Bytes = bytes;
100
106
}
101
107
102
108
// Returned - The specified argument is always the return value of the
103
109
// intrinsic.
104
- class Returned<AttrIndex idx> : IntrinsicProperty {
110
+ class Returned<ArgIndex idx> : IntrinsicProperty {
105
111
int ArgNo = idx.Value;
106
112
}
107
113
108
114
// ImmArg - The specified argument must be an immediate.
109
- class ImmArg<AttrIndex idx> : IntrinsicProperty {
115
+ class ImmArg<ArgIndex idx> : IntrinsicProperty {
110
116
int ArgNo = idx.Value;
111
117
}
112
118
113
119
// ReadOnly - The specified argument pointer is not written to through the
114
120
// pointer by the intrinsic.
115
- class ReadOnly<AttrIndex idx> : IntrinsicProperty {
121
+ class ReadOnly<ArgIndex idx> : IntrinsicProperty {
116
122
int ArgNo = idx.Value;
117
123
}
118
124
119
125
// WriteOnly - The intrinsic does not read memory through the specified
120
126
// argument pointer.
121
- class WriteOnly<AttrIndex idx> : IntrinsicProperty {
127
+ class WriteOnly<ArgIndex idx> : IntrinsicProperty {
122
128
int ArgNo = idx.Value;
123
129
}
124
130
125
131
// ReadNone - The specified argument pointer is not dereferenced by the
126
132
// intrinsic.
127
- class ReadNone<AttrIndex idx> : IntrinsicProperty {
133
+ class ReadNone<ArgIndex idx> : IntrinsicProperty {
128
134
int ArgNo = idx.Value;
129
135
}
130
136
0 commit comments