[llvm-branch-commits] [llvm-branch] r109241 - /llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp
Gabor Greif
ggreif at gmail.com
Fri Jul 23 10:48:46 PDT 2010
Author: ggreif
Date: Fri Jul 23 12:48:45 2010
New Revision: 109241
URL: http://llvm.org/viewvc/llvm-project?rev=109241&view=rev
Log:
precompute 8 tags
Modified:
llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp
Modified: llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp?rev=109241&r1=109240&r2=109241&view=diff
==============================================================================
--- llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp (original)
+++ llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp Fri Jul 23 12:48:45 2010
@@ -66,6 +66,7 @@
case xStop64Tag:
if (Current->Prev.getInt() == fullStop64Tag)
return Current + 1;
+ // fall thru...
case yStop64Tag:
if (Current->Prev.getInt() == xStop64Tag)
return Current + 2;
@@ -167,15 +168,16 @@
template <>
Use *Use::initTags<3>(Use * const Start, Use *Stop, ptrdiff_t Done) {
- if (Start == Stop)
- return Start;
-
- if (Done == 0) {
- ++Done;
- --Stop;
+ while (Done < 8) {
+ if (Start == Stop--)
+ return Start;
+ static const PrevPtrTag tags[8] = { fullStop64Tag, xStop64Tag, yStop64Tag,
+ stop64Tag, zero64Tag, xStop64Tag,
+ one64Tag, stop64Tag
+ };
+ Stop->Prev.setFromOpaqueValue(reinterpret_cast<Use**>(tags[Done++]));
Stop->Val = 0;
- Stop->Prev.setFromOpaqueValue(reinterpret_cast<Use**>(fullStop64Tag));
- }
+ }
ptrdiff_t Count = Done;
while (Start != Stop) {
More information about the llvm-branch-commits
mailing list