[llvm-branch-commits] [llvm-branch] r109349 - /llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp

Gabor Greif ggreif at gmail.com
Sat Jul 24 11:50:09 PDT 2010


Author: ggreif
Date: Sat Jul 24 13:50:09 2010
New Revision: 109349

URL: http://llvm.org/viewvc/llvm-project?rev=109349&view=rev
Log:
simplify and use constants (performance win)

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=109349&r1=109348&r2=109349&view=diff
==============================================================================
--- llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp (original)
+++ llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp Sat Jul 24 13:50:09 2010
@@ -54,22 +54,23 @@
     unsigned Tag = (Current++)->Prev.getInt();
     if (Tag < stop64Tag)
       continue;
-    ptrdiff_t Offset = Tag & 3;
+    ptrdiff_t Offset;
     switch (Tag) {
       case stop64Tag:
         switch (Current->Prev.getInt()) {
           case 0: ++Current; Offset = 4; goto digits;
           case xStop64Tag: ++Current; Offset = 1; goto digits;
           case yStop64Tag: return Current + 3;
-          default: goto digits;
+          default: Offset = 0; goto digits;
         }
       case xStop64Tag:
         if (Current->Prev.getInt() == fullStop64Tag)
           return Current + 1;
-        // fall thru...
+        Offset = 1; goto digits;
       case yStop64Tag:
         if (Current->Prev.getInt() == xStop64Tag)
           return Current + 2;
+        Offset = 2;
         while (true) {
           digits:
           unsigned Tag = Current->Prev.getInt();





More information about the llvm-branch-commits mailing list