llvm::isInTailCallPosition

Test whether an instruction is in a position for tail-call optimization.

Synopsis

Declared in <llvm/CodeGen/Analysis.h>

bool
isInTailCallPosition(
    CallBase const& Call,
    TargetMachine const& TM,
    bool ReturnsFirstArg = false);

Description

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.

Return Value

True if Call is in a tail-call position.

Parameters

NameDescription
CallCall instruction to test.
TMTarget machine providing target-specific constraints.
ReturnsFirstArgWhether the caller returns the call's first argument.