Check whether caller/callee attribute mismatches inhibit a tail call.
Synopsis
Declared in <llvm/CodeGen/Analysis.h>
bool
attributesPermitTailCall(
Function const* F,
Instruction const* I,
ReturnInst const* Ret,
TargetLoweringBase const& TLI,
bool* AllowDifferingSizes = nullptr);
Description
Assumes the input instruction is already in the tail call position. AllowDifferingSizes is an output parameter which, if forming a tail call is permitted, determines whether it's permitted only if the size of the caller's and callee's return types match exactly.
Return Value
True if attributes permit forming a tail call.
Parameters
Name |
Description |
F |
Caller function. |
I |
Call instruction in the tail‐call position. |
Ret |
Return instruction that follows the call. |
TLI |
Target lowering info used for attribute checks. |
AllowDifferingSizes |
Optional output; if non‐null and a tail call is permitted, set to whether differing return sizes are allowed. |
Created with MrDocs