summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-23 08:36:07 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-23 08:36:07 +0000
commit1025f21ef365c49a0f9c68a05507eda28b251b21 (patch)
tree124ec19b545ba4189cd0f5fbd75dd4095aace0d7
parent8abd1ca8d241690292dbe34edaf744f36dc0791d (diff)
downloadbcm5719-llvm-1025f21ef365c49a0f9c68a05507eda28b251b21.tar.gz
bcm5719-llvm-1025f21ef365c49a0f9c68a05507eda28b251b21.zip
Simplifying use_iterators by dereferencing
is not a good idea. The codebase does not depend in this any more, and it may introduce hidden runtime cost. If you get compile errors, please dereference your iterator before passing to cast<> (and friends). Also: please consider caching the result of operator* and reusing that instead of dereferencing many times. llvm-svn: 109220
-rw-r--r--llvm/include/llvm/Use.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/llvm/include/llvm/Use.h b/llvm/include/llvm/Use.h
index 2759338f42a..e1ebc6a51be 100644
--- a/llvm/include/llvm/Use.h
+++ b/llvm/include/llvm/Use.h
@@ -210,30 +210,6 @@ public:
unsigned getOperandNo() const;
};
-
-template<> struct simplify_type<value_use_iterator<User> > {
- typedef User* SimpleType;
-
- static SimpleType getSimplifiedValue(const value_use_iterator<User> &Val) {
- return *Val;
- }
-};
-
-template<> struct simplify_type<const value_use_iterator<User> >
- : public simplify_type<value_use_iterator<User> > {};
-
-template<> struct simplify_type<value_use_iterator<const User> > {
- typedef const User* SimpleType;
-
- static SimpleType getSimplifiedValue(const
- value_use_iterator<const User> &Val) {
- return *Val;
- }
-};
-
-template<> struct simplify_type<const value_use_iterator<const User> >
- : public simplify_type<value_use_iterator<const User> > {};
-
} // End llvm namespace
#endif
OpenPOWER on IntegriCloud