[llvm-commits] [llvm] r56197 - /llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp
Gabor Greif
ggreif at gmail.com
Sun Sep 14 11:41:27 PDT 2008
Author: ggreif
Date: Sun Sep 14 13:41:26 2008
New Revision: 56197
URL: http://llvm.org/viewvc/llvm-project?rev=56197&view=rev
Log:
fix an ugly bug with not updating the Junk window's start pointer
in obscure cases. With this fix the test do not assert out from my code.
Also enabled an efficiency hack, and now we show the waymarks in a better manner.
Modified:
llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp
Modified: llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp?rev=56197&r1=56196&r2=56197&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp Sun Sep 14 13:41:26 2008
@@ -132,7 +132,7 @@
case Use::fullStopTagN:
return reinterpret_cast<Value*>(Next);
case Use::stopTagN: {
- // efficiency:
+ efficiency:
// try to pick up exactly requiredSteps digits
int digits = requiredSteps;
Acc = 0;
@@ -158,11 +158,15 @@
PrevU = U;
U = stripTag<Use::tagMaskN>(U->Next);
}
- break;
+ goto efficiency;
}
default:
--digits;
Acc = (Acc << 1) | (Tag & 1);
+ if (Cushion <= 0) {
+ PrevU = U;
+ U = stripTag<Use::tagMaskN>(U->Next);
+ }
continue;
}
break;
@@ -290,11 +294,17 @@
return addTag((Use*)V, fullStopTagN);
}
+static bool again(false);
+
Value *Use::get() const {
Value *V(Val1);
+ // if ((size_t)V == 0x5b0d150)
+ // getValue();
Value *ValComp(getValue());
if (V != ValComp)
assert(V == ValComp && "Computed Value wrong?");
+ if (again)
+ getValue();
return V;
}
@@ -314,8 +324,11 @@
std::cerr << TagChar(TagHere);
me = stripTag<tagMaskN>(me);
- if (TagHere == fullStopTagN)
+ if (TagHere == fullStopTagN) {
std::cerr << " ---> " << me << std::endl;
+ std::cerr << "1234567890123456789012345678901234567890123456789012345678901234567890" << std::endl;
+ std::cerr << " 1 2 3 4 5 6 7" << std::endl;
+ }
else
me->showWaymarks();
}
More information about the llvm-commits
mailing list