llvm::canReplaceReg

Check if DstReg can be replaced with SrcReg depending on the register constraints.

Synopsis

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

bool
canReplaceReg(
    Register DstReg,
    Register SrcReg,
    MachineRegisterInfo& MRI);

Return Value

True if DstReg can be replaced with SrcReg.

Parameters

NameDescription
DstRegDestination register that would be replaced.
SrcRegSource register proposed as the replacement.
MRIRegister information for the function.