Attempt to constant fold a call to the specified function with the specified arguments, returning null if unsuccessful.

Synopsis

Declared in <llvm/Analysis/ConstantFolding.h>

Constant*
ConstantFoldCall(
    CallBase const* Call,
    Function* F,
    ArrayRef<Constant*> Operands,
    TargetLibraryInfo const* TLI = nullptr,
    bool AllowNonDeterministic = true);

Return Value

The folded constant result, or null if unsuccessful.

Parameters

Name

Description

Call

Call site providing attributes and FP environment context.

F

Callee function to fold.

Operands

Constant arguments to the call.

TLI

Optional target library info for libcall recognition.

AllowNonDeterministic

Whether non‐deterministic fold results are OK.

Created with MrDocs