[llvm] fc5849d - [X86] Avoid repeated hash lookups (NFC) (#127748)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 08:21:57 PST 2025
Author: Kazu Hirata
Date: 2025-02-19T08:21:53-08:00
New Revision: fc5849de6abba74dd0bb9a062b207ba4fcd7a37d
URL: https://github.com/llvm/llvm-project/commit/fc5849de6abba74dd0bb9a062b207ba4fcd7a37d
DIFF: https://github.com/llvm/llvm-project/commit/fc5849de6abba74dd0bb9a062b207ba4fcd7a37d.diff
LOG: [X86] Avoid repeated hash lookups (NFC) (#127748)
Added:
Modified:
llvm/lib/Target/X86/X86PadShortFunction.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86PadShortFunction.cpp b/llvm/lib/Target/X86/X86PadShortFunction.cpp
index c43fd97a055fc..2859195c6c26e 100644
--- a/llvm/lib/Target/X86/X86PadShortFunction.cpp
+++ b/llvm/lib/Target/X86/X86PadShortFunction.cpp
@@ -163,7 +163,8 @@ void PadShortFunc::findReturns(MachineBasicBlock *MBB, unsigned int Cycles) {
return;
if (hasReturn) {
- ReturnBBs[MBB] = std::max(ReturnBBs[MBB], Cycles);
+ unsigned int &NumCycles = ReturnBBs[MBB];
+ NumCycles = std::max(NumCycles, Cycles);
return;
}
More information about the llvm-commits
mailing list