llvm::MachineInstr::readsWritesVirtualRegister

Return whether this instruction reads and/or writes virtual register Reg.

Synopsis

Declared in <llvm/CodeGen/MachineInstr.h>

std::pair<bool, bool>
readsWritesVirtualRegister(
    Register Reg,
    SmallVectorImpl<unsigned int>* Ops = nullptr) const;

Description

Partial defines count as both. When Ops is non-null, operand indices for Reg are appended.

Return Value

Pair of (reads, writes) booleans.

Parameters

NameDescription
RegVirtual register to inspect.
OpsOptional output vector of matching operand indices.