diff options
author | Chris Lattner <sabre@nondot.org> | 2011-01-16 07:11:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-01-16 07:11:21 +0000 |
commit | 54cfe7e027ee56799f3d597fd5095394f66e0ff0 (patch) | |
tree | 6fd6bcc32b31bcd30c25aca80b3d82f0af913ff2 /lib/Transforms/Scalar/SCCP.cpp | |
parent | b0daffc609f4e42fe81d4da641f7a9dc947bad53 (diff) | |
download | external_llvm-54cfe7e027ee56799f3d597fd5095394f66e0ff0.zip external_llvm-54cfe7e027ee56799f3d597fd5095394f66e0ff0.tar.gz external_llvm-54cfe7e027ee56799f3d597fd5095394f66e0ff0.tar.bz2 |
simplify a little
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r-- | lib/Transforms/Scalar/SCCP.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
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<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: |