[llvm] r281956 - Machine{Instr|Operand}: Clarify some isIdenticalTo() subtleties.

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 19 18:14:39 PDT 2016


Author: matze
Date: Mon Sep 19 20:14:39 2016
New Revision: 281956

URL: http://llvm.org/viewvc/llvm-project?rev=281956&view=rev
Log:
Machine{Instr|Operand}: Clarify some isIdenticalTo() subtleties.

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

Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=281956&r1=281955&r2=281956&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Mon Sep 19 20:14:39 2016
@@ -721,8 +721,9 @@ public:
     IgnoreVRegDefs  // Ignore virtual register definitions
   };
 
-  /// Return true if this instruction is identical to (same
-  /// opcode and same operands as) the specified instruction.
+  /// Return true if this instruction is identical to \p Other.
+  /// Identical meaning same opcode and all operands reported as
+  /// isIdenticalOp()  (equal except for liveness flags).
   bool isIdenticalTo(const MachineInstr &Other,
                      MICheckType Check = CheckDefs) const;
 

Modified: llvm/trunk/include/llvm/CodeGen/MachineOperand.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineOperand.h?rev=281956&r1=281955&r2=281956&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineOperand.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineOperand.h Mon Sep 19 20:14:39 2016
@@ -566,8 +566,8 @@ public:
   // Other methods.
   //===--------------------------------------------------------------------===//
 
-  /// isIdenticalTo - Return true if this operand is identical to the specified
-  /// operand. Note: This method ignores isKill and isDead properties.
+  /// Returns true if this operand is identical to the specified operand except
+  /// for liveness related flags (isKill, isUndef and isDead).
   bool isIdenticalTo(const MachineOperand &Other) const;
 
   /// \brief MachineOperand hash_value overload.




More information about the llvm-commits mailing list