aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-08-15 15:16:50 +0000
committerChris Lattner <sabre@nondot.org>2008-08-15 15:16:50 +0000
commit3b12ab451924a356c190b23def44744573abe871 (patch)
treedaeee2f146d5d9c495fb8070904a34d618f3422c /lib
parent21066541ae22608106fa980bd90f9f6cc7cc8037 (diff)
Inline the fastpath of PATypeHolder::get(). This is a small speedup in
instcombine among other things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Type.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index b7bf339ab8..be21194979 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -35,21 +35,6 @@ AbstractTypeUser::~AbstractTypeUser() {}
//===----------------------------------------------------------------------===//
-// Type PATypeHolder Implementation
-//===----------------------------------------------------------------------===//
-
-/// get - This implements the forwarding part of the union-find algorithm for
-/// abstract types. Before every access to the Type*, we check to see if the
-/// type we are pointing to is forwarding to a new type. If so, we drop our
-/// reference to the type.
-///
-Type* PATypeHolder::get() const {
- const Type *NewTy = Ty->getForwardedType();
- if (!NewTy) return const_cast<Type*>(Ty);
- return *const_cast<PATypeHolder*>(this) = NewTy;
-}
-
-//===----------------------------------------------------------------------===//
// Type Class Implementation
//===----------------------------------------------------------------------===//