[llvm] [ReachingDefAnalysis] Fix management of MBBFrameObjsReachingDefs (PR #124943)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 31 10:52:01 PST 2025
================
@@ -344,15 +342,10 @@ int ReachingDefAnalysis::getReachingDef(MachineInstr *MI, Register Reg) const {
int Key = FrameIndex - ObjectIndexBegin;
// Check that there was a reaching def.
- auto Lookup1 = MBBFrameObjsReachingDefs.find(MBBNumber);
- if (Lookup1 == MBBFrameObjsReachingDefs.end())
- return LatestDef;
- auto &InnerMap = Lookup1->second;
- auto Lookup2 = InnerMap.find(Key);
- if (Lookup2 == InnerMap.end())
+ auto Lookup = MBBFrameObjsReachingDefs.find({MBBNumber, Key});
----------------
topperc wrote:
Doesn't this need to use FrameIndex instead of Key?
https://github.com/llvm/llvm-project/pull/124943
More information about the llvm-commits
mailing list