Commit 150ab995 authored by Shengchen Kan's avatar Shengchen Kan
Browse files

[X86][NFC] Add documentation for methods in X86InstrInfo.h

Address RKSimon's comment in 2960656e
parent 9179d87a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -686,7 +686,15 @@ private:
                            const MachineInstr &OI, bool *IsSwapped,
                            int64_t *ImmDelta) const;

  /// Commute operands of \p MI for memory fold.
  ///
  /// \param Idx1 the index of operand to be commuted.
  ///
  /// \returns the index of operand that is commuted with \p Idx1. If the method
  /// fails to commute the operands, it will return \p Idx1.
  unsigned commuteOperandsForFold(MachineInstr &MI, unsigned Idx1) const;

  /// Undo the commute of operands of \p MI at index \p Idx1 and index \p Idx2.
  void UndoCommuteForFold(MachineInstr &MI, unsigned Idx1, unsigned Idx2) const;
};
} // namespace llvm