ΒΆOptional<llvm::ValueAndVReg>
getConstantVRegValWithLookThrough(
unsigned int VReg,
const llvm::MachineRegisterInfo& MRI,
bool LookThroughInstrs = true,
bool HandleFConstants = true)
Optional<llvm::ValueAndVReg>
getConstantVRegValWithLookThrough(
unsigned int VReg,
const llvm::MachineRegisterInfo& MRI,
bool LookThroughInstrs = true,
bool HandleFConstants = true)
Description
If \p VReg is defined by a statically evaluable chain of instructions rooted on a G_F/CONSTANT (\p LookThroughInstrs == true) and that constant fits in int64_t, returns its value as well as the virtual register defined by this G_F/CONSTANT. When \p LookThroughInstrs == false this function behaves like getConstantVRegVal. When \p HandleFConstants == false the function bails on G_FCONSTANTs.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/Utils.h:129
Parameters
- unsigned int VReg
- const llvm::MachineRegisterInfo& MRI
- bool LookThroughInstrs = true
- bool HandleFConstants = true