aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-12-20 22:28:03 +0000
committerOwen Anderson <resistor@mac.com>2010-12-20 22:28:03 +0000
commit3b77f56194952bc3767c11e8b216906d404fcb2c (patch)
tree3d1300f52f44e0c444b61d3d624d8754ccc0a891 /lib/VMCore
parent672fb6225b381b4dcb2e88fccb79d928eaabf82c (diff)
downloadexternal_llvm-3b77f56194952bc3767c11e8b216906d404fcb2c.zip
external_llvm-3b77f56194952bc3767c11e8b216906d404fcb2c.tar.gz
external_llvm-3b77f56194952bc3767c11e8b216906d404fcb2c.tar.bz2
Revert r122114 (CallbackVH observing use-list changes) because it caused severe slowdowns on the Linux self-host configuration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Value.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index 3c32c56..76cfb90 100644
--- a/lib/VMCore/Value.cpp
+++ b/lib/VMCore/Value.cpp
@@ -281,16 +281,6 @@ void Value::takeName(Value *V) {
}
-/// addUse - This method should only be used by the Use class.
-///
-void Value::addUse(Use &U) {
- U.addToList(&UseList);
-
- // Notify all ValueHandles (if present) that this value added a Use.
- if (HasValueHandle)
- ValueHandleBase::ValueAddedUse(U);
-}
-
// uncheckedReplaceAllUsesWith - This is exactly the same as replaceAllUsesWith,
// except that it doesn't have all of the asserts. The asserts fail because we
// are half-way done resolving types, which causes some types to exist as two
@@ -579,34 +569,6 @@ void ValueHandleBase::ValueIsDeleted(Value *V) {
}
}
-void ValueHandleBase::ValueAddedUse(Use &U) {
- assert(U->HasValueHandle && "Should only be called if ValueHandles present");
-
- // Get the linked list base, which is guaranteed to exist since the
- // HasValueHandle flag is set.
- LLVMContextImpl *pImpl = U->getContext().pImpl;
- ValueHandleBase *Entry = pImpl->ValueHandles[U.get()];
-
- assert(Entry && "Value bit set but no entries exist");
-
- // We use a local ValueHandleBase as an iterator so that
- // ValueHandles can add and remove themselves from the list without
- // breaking our iteration. This is not really an AssertingVH; we
- // just have to give ValueHandleBase some kind.
- for (ValueHandleBase Iterator(Assert, *Entry); Entry; Entry = Iterator.Next) {
- Iterator.RemoveFromUseList();
- Iterator.AddToExistingUseListAfter(Entry);
- assert(Entry->Next == &Iterator && "Loop invariant broken.");
-
- switch (Entry->getKind()) {
- default:
- break;
- case Callback:
- static_cast<CallbackVH*>(Entry)->addedUse(U);
- break;
- }
- }
-}
void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) {
assert(Old->HasValueHandle &&"Should only be called if ValueHandles present");