See if Reg is defined by an single def instruction of type T Also try to do trivial folding if it's a COPY with same types. Returns null otherwise.

Synopsis

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

template<class T>
T*
getOpcodeDef(
    Register Reg,
    MachineRegisterInfo const& MRI);

Return Value

The defining instruction cast to T, or nullptr.

Parameters

Name

Description

Reg

Virtual register whose defining instruction is inspected.

MRI

Register information for the function.

Created with MrDocs