[llvm-commits] [llvm] r49900 - in /llvm/branches/ggreif/use-diet: include/llvm/Use.h lib/VMCore/Use.cpp
Gabor Greif
ggreif at gmail.com
Fri Apr 18 07:00:35 PDT 2008
Author: ggreif
Date: Fri Apr 18 09:00:34 2008
New Revision: 49900
URL: http://llvm.org/viewvc/llvm-project?rev=49900&view=rev
Log:
clearing of Val still necessary, transferTag takes an *untagged* To pointer, cleanups
Modified:
llvm/branches/ggreif/use-diet/include/llvm/Use.h
llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp
Modified: llvm/branches/ggreif/use-diet/include/llvm/Use.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/include/llvm/Use.h?rev=49900&r1=49899&r2=49900&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/include/llvm/Use.h (original)
+++ llvm/branches/ggreif/use-diet/include/llvm/Use.h Fri Apr 18 09:00:34 2008
@@ -132,8 +132,9 @@
*List = this;
}
void removeFromList() {
- *llvm::stripTag<fullStopTag>(Prev) = Next;
- if (Next) Next->Prev = llvm::transferTag<fullStopTag>(Next->Prev, Prev);
+ Use **StrippedPrev = llvm::stripTag<fullStopTag>(Prev);
+ *StrippedPrev = Next;
+ if (Next) Next->Prev = llvm::transferTag<fullStopTag>(Next->Prev, StrippedPrev);
}
friend class Value;
Modified: llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp?rev=49900&r1=49899&r2=49900&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp Fri Apr 18 09:00:34 2008
@@ -11,7 +11,6 @@
//
//===----------------------------------------------------------------------===//
-//#include "llvm/Value.h"
#include "llvm/User.h"
namespace llvm {
@@ -27,8 +26,7 @@
while (true) {
unsigned Tag = extractTag<PrevPtrTag, fullStopTag>(Current->Prev);
- switch (Tag)
- {
+ switch (Tag) {
case zeroDigitTag:
case oneDigitTag:
if (StopEncountered)
@@ -54,9 +52,9 @@
Use *Use::initTags(Use * const Start, Use *Stop, ptrdiff_t Done) {
ptrdiff_t Count = 0;
- while (Start != Stop)
- {
+ while (Start != Stop) {
--Stop;
+ Stop->Val = 0;
if (!Count) {
Stop->Prev = reinterpret_cast<Use**>(Done == 0 ? fullStopTag : stopTag);
++Done;
More information about the llvm-commits
mailing list