[llvm] 2e6530c - [LiveIntervals] Fix comment to match code for getNextValue (NFC)
Carl Ritson via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 30 22:08:21 PDT 2023
Author: Carl Ritson
Date: 2023-07-31T14:06:25+09:00
New Revision: 2e6530c8e0a5a0a543991d8334c4dcca56b27c86
URL: https://github.com/llvm/llvm-project/commit/2e6530c8e0a5a0a543991d8334c4dcca56b27c86
DIFF: https://github.com/llvm/llvm-project/commit/2e6530c8e0a5a0a543991d8334c4dcca56b27c86.diff
LOG: [LiveIntervals] Fix comment to match code for getNextValue (NFC)
Comment mentions MIIdx, but the actual parameter is def.
Fix comment, but also rename parameter to Def to match current
coding standards while touching the code.
Added:
Modified:
llvm/include/llvm/CodeGen/LiveInterval.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/LiveInterval.h b/llvm/include/llvm/CodeGen/LiveInterval.h
index 92e35c9a4ab946..c2741f5dd228e0 100644
--- a/llvm/include/llvm/CodeGen/LiveInterval.h
+++ b/llvm/include/llvm/CodeGen/LiveInterval.h
@@ -326,11 +326,11 @@ namespace llvm {
return VNI && VNI->id < getNumValNums() && VNI == getValNumInfo(VNI->id);
}
- /// getNextValue - Create a new value number and return it. MIIdx specifies
- /// the instruction that defines the value number.
- VNInfo *getNextValue(SlotIndex def, VNInfo::Allocator &VNInfoAllocator) {
+ /// getNextValue - Create a new value number and return it.
+ /// @p Def is the index of instruction that defines the value number.
+ VNInfo *getNextValue(SlotIndex Def, VNInfo::Allocator &VNInfoAllocator) {
VNInfo *VNI =
- new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), def);
+ new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), Def);
valnos.push_back(VNI);
return VNI;
}
More information about the llvm-commits
mailing list