Call
public struct Call : IRInstruction
Represents a simple function call.
-
Retrieves the underlying LLVM value object.
Declaration
Swift
public func asLLVM() -> LLVMValueRef
-
Retrieves the number of argument operands passed by this call.
Declaration
Swift
public var argumentCount: Int { get }
-
Accesses the calling convention for this function call.
Declaration
Swift
public var callingConvention: CallingConvention { get set }
-
Returns whether this function call is a tail call.
A tail call may not reference memory in the stack frame of the calling function. Therefore, the callee may reuse the stack memory of the caller.
This attribute requires support from the target architecture.
Declaration
Swift
public var isTailCall: Bool { get set }
-
Accesses the tail call marker associated with this call.
The presence of the tail call marker affects the optimizer’s decisions around tail call optimizations. The presence of a
tail
ormustTail
marker, either inserted by the user or by the optimizer, is a strong hint (or a requirement) that tail call optimizations occur. The presence ofnoTail
acts to block any tail call optimization.Tail call optimization is finicky and requires a number of complex invariants hold before a call is eligible for the optimization. Even then, it is not necessarily guaranteed by LLVM in all cases.
Declaration
Swift
public var tailCallKind: TailCallKind { get set }
-
Retrieves the alignment of the parameter at the given index.
This property is currently set-only due to limitations of the LLVM C API.
Declaration
Swift
public func setParameterAlignment(at i: Int, to alignment: Alignment)
Parameters
i
The index of the parameter to retrieve.
alignment
The alignment to apply to the parameter.
-
Optimization markers for tail call elimination.
See moreDeclaration
Swift
public enum TailCallKind