File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,10 @@ public struct Call: IRInstruction {
2222 set { LLVMSetInstructionCallConv ( self . llvm, newValue. llvm. rawValue) }
2323 }
2424
25- /// Returns whether this function call is a tail call. That is, if the callee
26- /// may reuse the stack memory of the caller.
25+ /// Returns whether this function call is a tail call.
26+ ///
27+ /// A tail call may not reference memory in the stack frame of the calling
28+ /// function. Therefore, the callee may reuse the stack memory of the caller.
2729 ///
2830 /// This attribute requires support from the target architecture.
2931 public var isTailCall : Bool {
Original file line number Diff line number Diff line change @@ -163,6 +163,14 @@ public enum AttributeKind: String {
163163 /// argument or return value are not also accessed, during the execution of
164164 /// the function, via pointer values not based on the argument or return
165165 /// value.
166+ ///
167+ /// The `noalias` attribute may appear in one of two location: on arguments
168+ /// types or on return types. On argument types, `noalias` acts like the
169+ /// `restrict` keyword in C and C++ and implies that no other pointer value
170+ /// points to this object. On return types, `noalias` implies that the
171+ /// returned pointer is not aliased by any other pointer in the program.
172+ ///
173+ /// Practically, this allows LLVM to reorder accesses to this memory.
166174 case noalias
167175 /// This indicates that the callee does not make any copies of the pointer
168176 /// that outlive the callee itself.
You can’t perform that action at this time.
0 commit comments