From: Owen Anderson Date: Fri, 25 Jul 2008 21:35:43 +0000 (+0000) Subject: In order to avoid reprocessing a register more than once, we need to add it X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=020decc2b4a193a22314e174808269a5ea430dfe;p=oota-llvm.git In order to avoid reprocessing a register more than once, we need to add it to the handled set so it will get filtered out in future iterations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54065 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/StrongPHIElimination.cpp b/lib/CodeGen/StrongPHIElimination.cpp index 9a9fba550b8..7f98463e48c 100644 --- a/lib/CodeGen/StrongPHIElimination.cpp +++ b/lib/CodeGen/StrongPHIElimination.cpp @@ -741,7 +741,7 @@ void StrongPHIElimination::ScheduleCopies(MachineBasicBlock* MBB, std::set RegHandled; for (SmallVector, 4>::iterator I = InsertedPHIDests.begin(), E = InsertedPHIDests.end(); I != E; ++I) - if (!RegHandled.count(I->first)) + if (!RegHandled.insert(I->first).second) LI.addLiveRangeToEndOfBlock(I->first, I->second); }