Test whether an instruction is in a position for tail-call optimization.
Declared in <llvm/CodeGen/Analysis.h>
bool
isInTailCallPosition(
CallBase const& Call,
TargetMachine const& TM,
bool ReturnsFirstArg = false);
This roughly means that it's in a block with a return and there's nothing that needs to be scheduled between it and the return.
This function only tests target-independent requirements.
True if Call is in a tail-call position.
| Name | Description |
|---|---|
| Call | Call instruction to test. |
| TM | Target machine providing target-specific constraints. |
| ReturnsFirstArg | Whether the caller returns the call's first argument. |