1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

simplify a little

llvm-svn: 123573
This commit is contained in:
Chris Lattner 2011-01-16 07:11:21 +00:00
parent 91f1b21cf1
commit f3b214e298

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: