simplify a little

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123573 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2011-01-16 07:11:21 +00:00
parent b0daffc609
commit 54cfe7e027

View File

@ -487,15 +487,11 @@ private:
/// exponential growth of the table in rare cases.)
void InsertInOverdefinedPHIs(Instruction *I, PHINode *PN) {
std::multimap<PHINode*, Instruction*>::iterator J, E;
bool found = false;
tie(J, E) = UsersOfOverdefinedPHIs.equal_range(PN);
for (; J != E; ++J)
if (J->second == I) {
found = true;
break;
}
if (!found)
UsersOfOverdefinedPHIs.insert(std::make_pair(PN, I));
if (J->second == I)
return;
UsersOfOverdefinedPHIs.insert(std::make_pair(PN, I));
}
private: