Return true if this instruction reads Reg.

Synopsis

Declared in <llvm/CodeGen/MachineInstr.h>

bool
readsRegister(
    Register Reg,
    TargetRegisterInfo const* TRI) const;

Description

With a non‐null TRI, also matches a read of a super‐register. Partial redefines of virtual registers are not counted as reads.

Return Value

True if Reg is read.

Parameters

Name

Description

Reg

Register whose read is queried.

TRI

Optional target register info for super‐register checks.

Created with MrDocs