diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-12-22 22:16:31 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-12-22 22:16:31 +0000 |
commit | 75f02ee771bae2d6682f873895cd003bac60ba7e (patch) | |
tree | d6a9eda0bc6006efd71c3b17b95a469676ef9452 /lib | |
parent | 70ded19b3f69b8795423ec301da4ad9143ba9f15 (diff) | |
download | external_llvm-75f02ee771bae2d6682f873895cd003bac60ba7e.zip external_llvm-75f02ee771bae2d6682f873895cd003bac60ba7e.tar.gz external_llvm-75f02ee771bae2d6682f873895cd003bac60ba7e.tar.bz2 |
Simplification: Negate the operator== method instead of implementing a full operator!= method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61352 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index e517b3a..aca49ba 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -110,30 +110,7 @@ namespace { } bool operator!=(const Expression &other) const { - if (opcode != other.opcode) - return true; - else if (opcode == EMPTY || opcode == TOMBSTONE) - return false; - else if (type != other.type) - return true; - else if (function != other.function) - return true; - else if (firstVN != other.firstVN) - return true; - else if (secondVN != other.secondVN) - return true; - else if (thirdVN != other.thirdVN) - return true; - else { - if (varargs.size() != other.varargs.size()) - return true; - - for (size_t i = 0; i < varargs.size(); ++i) - if (varargs[i] != other.varargs[i]) - return true; - - return false; - } + return !(*this == other); } }; |