aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShengchen Kan <shengchen.kan@intel.com>2024-01-31 12:44:44 +0800
committerShengchen Kan <shengchen.kan@intel.com>2024-01-31 12:47:43 +0800
commit150ab99583e252a809b94f89da2576a1fc808297 (patch)
tree8aae674f134e5e7ea3923da8c6bb44196f920c5d
parent9179d87abce8e92c0bf30bc1ee1c17e17e362bc0 (diff)
downloadllvm-150ab99583e252a809b94f89da2576a1fc808297.zip
llvm-150ab99583e252a809b94f89da2576a1fc808297.tar.gz
llvm-150ab99583e252a809b94f89da2576a1fc808297.tar.bz2
[X86][NFC] Add documentation for methods in X86InstrInfo.h
Address RKSimon's comment in 2960656eb909b5361ce2c3f641ee341769076ab7
-rw-r--r--llvm/lib/Target/X86/X86InstrInfo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h
index 8512635..e3f98a5 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.h
+++ b/llvm/lib/Target/X86/X86InstrInfo.h
@@ -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