[PATCH] D89625: Add default value for MachineInstr::modifiesRegister. NFC.

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 17 08:51:36 PDT 2020


chill created this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
chill requested review of this revision.

Looks accidentally omitted, it's present on  `readsRegister`,  `definesRegister` and few others.


https://reviews.llvm.org/D89625

Files:
  llvm/include/llvm/CodeGen/MachineInstr.h


Index: llvm/include/llvm/CodeGen/MachineInstr.h
===================================================================
--- llvm/include/llvm/CodeGen/MachineInstr.h
+++ llvm/include/llvm/CodeGen/MachineInstr.h
@@ -1333,7 +1333,8 @@
   /// 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;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89625.298828.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201017/0032187d/attachment.bin>


More information about the llvm-commits mailing list