llvm::getFConstantVRegValWithLookThrough

If VReg is defined by a statically evaluable chain of instructions rooted on a G_FCONSTANT returns its APFloat value and def register.

Synopsis

Declared in <llvm/CodeGen/GlobalISel/Utils.h>

std::optional<FPValueAndVReg>
getFConstantVRegValWithLookThrough(
    Register VReg,
    MachineRegisterInfo const& MRI,
    bool LookThroughInstrs = true);

Return Value

The float constant and def register, or std::nullopt.

Parameters

NameDescription
VRegVirtual register to look through for a float constant.
MRIRegister information for the function.
LookThroughInstrsWhether to fold through trivial defining ops.