From 54cfe7e027ee56799f3d597fd5095394f66e0ff0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 16 Jan 2011 07:11:21 +0000 Subject: simplify a little git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123573 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/SCCP.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib/Transforms/Scalar/SCCP.cpp') diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 20254d7..b9340c7 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -487,15 +487,11 @@ private: /// exponential growth of the table in rare cases.) void InsertInOverdefinedPHIs(Instruction *I, PHINode *PN) { std::multimap::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: -- cgit v1.1