[llvm-commits] [llvm] r82900 - /llvm/trunk/lib/VMCore/Type.cpp
Dan Gohman
gohman at apple.com
Sun Sep 27 08:32:21 PDT 2009
Author: djg
Date: Sun Sep 27 10:32:21 2009
New Revision: 82900
URL: http://llvm.org/viewvc/llvm-project?rev=82900&view=rev
Log:
Micro-optimize DerivedType::dropAllTypeUses.
Modified:
llvm/trunk/lib/VMCore/Type.cpp
Modified: llvm/trunk/lib/VMCore/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Type.cpp?rev=82900&r1=82899&r2=82900&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Type.cpp (original)
+++ llvm/trunk/lib/VMCore/Type.cpp Sun Sep 27 10:32:21 2009
@@ -498,8 +498,9 @@
// pick so long as it doesn't point back to this type. We choose something
// concrete to avoid overhead for adding to AbstractTypeUser lists and
// stuff.
+ const Type *ConcreteTy = Type::getInt32Ty(getContext());
for (unsigned i = 1, e = NumContainedTys; i != e; ++i)
- ContainedTys[i] = Type::getInt32Ty(getContext());
+ ContainedTys[i] = ConcreteTy;
}
}
More information about the llvm-commits
mailing list