Skip to content

Commit

Permalink
Add default value for MachineInstr::modifiesRegister. NFC.
Browse files Browse the repository at this point in the history
Looks accidentally omitted, it's present on `readsRegister`,
`definesRegister` and few others.

Differential Revision: https://reviews.llvm.org/D89625
  • Loading branch information
momchil-velikov committed Nov 5, 2020
1 parent ce5f4f2 commit 35d6251
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/include/llvm/CodeGen/MachineInstr.h
Expand Up @@ -1333,7 +1333,8 @@ class MachineInstr
/// Return true if the MachineInstr modifies (fully define or partially
/// define) the specified register.
/// NOTE: It's ignoring subreg indices on virtual registers.
bool modifiesRegister(Register Reg, const TargetRegisterInfo *TRI) const {
bool modifiesRegister(Register Reg,
const TargetRegisterInfo *TRI = nullptr) const {
return findRegisterDefOperandIdx(Reg, false, true, TRI) != -1;
}

Expand Down

0 comments on commit 35d6251

Please sign in to comment.