[llvm] 35defdf - Revert "[ReachingDefAnalysis][NFC] Use at instead of lookup for DenseMap access"

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 08:22:42 PST 2025


Author: Michael Maitland
Date: 2025-01-29T08:21:59-08:00
New Revision: 35defdf4707dfa58802188d2aad1298cddb44cb6

URL: https://github.com/llvm/llvm-project/commit/35defdf4707dfa58802188d2aad1298cddb44cb6
DIFF: https://github.com/llvm/llvm-project/commit/35defdf4707dfa58802188d2aad1298cddb44cb6.diff

LOG: Revert "[ReachingDefAnalysis][NFC] Use at instead of lookup for DenseMap access"

This reverts commit 3ce97e4aa98ad6a3502528818ff11eee89ef2fae. Pushed to main
prematurley.

Added: 
    

Modified: 
    llvm/lib/CodeGen/ReachingDefAnalysis.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
index f3855348c695cf..3d88c6815d51c9 100644
--- a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
+++ b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
@@ -348,8 +348,8 @@ int ReachingDefAnalysis::getReachingDef(MachineInstr *MI, Register Reg) const {
 
   if (Register::isStackSlot(Reg)) {
     int FrameIndex = Register::stackSlot2Index(Reg);
-    int Key = FrameIndex - ObjectIndexBegin;
-    for (int Def : MBBFrameObjsReachingDefs.at(MBBNumber).at(Key)) {
+    for (int Def : MBBFrameObjsReachingDefs.lookup(MBBNumber).lookup(
+             FrameIndex - ObjectIndexBegin)) {
       if (Def >= InstId)
         break;
       DefRes = Def;


        


More information about the llvm-commits mailing list