[llvm] 35d6251 - Add default value for MachineInstr::modifiesRegister. NFC.

Momchil Velikov via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 10:50:52 PST 2020


Author: Momchil Velikov
Date: 2020-11-05T18:50:19Z
New Revision: 35d625125465a753733942b44863cb1bd11338dd

URL: https://github.com/llvm/llvm-project/commit/35d625125465a753733942b44863cb1bd11338dd
DIFF: https://github.com/llvm/llvm-project/commit/35d625125465a753733942b44863cb1bd11338dd.diff

LOG: Add default value for MachineInstr::modifiesRegister. NFC.

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

Differential Revision: https://reviews.llvm.org/D89625

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h
index 842abc698b8f..6247f2a2c9b2 100644
--- a/llvm/include/llvm/CodeGen/MachineInstr.h
+++ b/llvm/include/llvm/CodeGen/MachineInstr.h
@@ -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;
   }
 


        


More information about the llvm-commits mailing list