diff options
Diffstat (limited to 'llvm/lib/CodeGen/ReachingDefAnalysis.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ReachingDefAnalysis.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp index 4e18c7d..cb53ea4 100644 --- a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp +++ b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp @@ -423,7 +423,9 @@ MachineInstr *ReachingDefAnalysis::getUniqueReachingMIDef(MachineInstr *MI, SmallPtrSet<MachineBasicBlock*, 4> VisitedBBs; SmallPtrSet<MachineInstr*, 2> Incoming; - for (auto *Pred : MI->getParent()->predecessors()) + MachineBasicBlock *Parent = MI->getParent(); + VisitedBBs.insert(Parent); + for (auto *Pred : Parent->predecessors()) getLiveOuts(Pred, PhysReg, Incoming, VisitedBBs); // If we have a local def and an incoming instruction, then there's not a |