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.
Declared in <llvm/CodeGen/GlobalISel/Utils.h>
template<class T>
T*
getOpcodeDef(
Register Reg,
MachineRegisterInfo const& MRI);
The defining instruction cast to T, or nullptr.
| Name | Description |
|---|---|
| Reg | Virtual register whose defining instruction is inspected. |
| MRI | Register information for the function. |