[llvm-branch-commits] [llvm-branch] r201943 - define macro TAG_AT for explicit positioning of the tag at a bit position

Gabor Greif ggreif at gmail.com
Sat Feb 22 11:29:05 PST 2014


Author: ggreif
Date: Sat Feb 22 13:29:05 2014
New Revision: 201943

URL: http://llvm.org/viewvc/llvm-project?rev=201943&view=rev
Log:
define macro TAG_AT for explicit positioning of the tag at a bit position

Modified:
    llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp

Modified: llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp?rev=201943&r1=201942&r2=201943&view=diff
==============================================================================
--- llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp (original)
+++ llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp Sat Feb 22 13:29:05 2014
@@ -91,14 +91,16 @@ Use *Use::initTags(Use * const Start, Us
   while (Done < 20) {
     if (Start == Stop--)
       return Start;
+#   define TAG_AT(N, TAG) ((unsigned long)TAG << (N * 2))
     static const unsigned long tags =
-      (unsigned long)fullStopTag << 38 | (unsigned long)oneDigitTag << 36 | (unsigned long)stopTag << 34 |
-      (unsigned long)oneDigitTag << 32 | oneDigitTag << 30 | stopTag << 28 |
-      zeroDigitTag << 26 | oneDigitTag << 24 | oneDigitTag << 22 |
-      stopTag << 20 | zeroDigitTag << 18 | oneDigitTag << 16 |
-      zeroDigitTag << 14 | oneDigitTag << 12 | stopTag << 10 |
-      oneDigitTag << 8 | oneDigitTag << 6 | oneDigitTag << 4 |
-      oneDigitTag << 2 | stopTag;
+      TAG_AT(19, fullStopTag) | TAG_AT(18, oneDigitTag) | TAG_AT(17, stopTag) |
+      TAG_AT(16, oneDigitTag) | TAG_AT(15, oneDigitTag) | TAG_AT(14, stopTag) |
+      TAG_AT(13, zeroDigitTag) | TAG_AT(12, oneDigitTag) | TAG_AT(11, oneDigitTag) |
+      TAG_AT(10, stopTag) | TAG_AT(9, zeroDigitTag) | TAG_AT(8, oneDigitTag) |
+      TAG_AT(7, zeroDigitTag) | TAG_AT(6, oneDigitTag) | TAG_AT(5, stopTag) |
+      TAG_AT(4, oneDigitTag) | TAG_AT(3, oneDigitTag) | TAG_AT(2, oneDigitTag) |
+      TAG_AT(1, oneDigitTag) | TAG_AT(0, stopTag);
+#   undef TAG_AT
     new(Stop) Use(PrevPtrTag((tags >> (19 - Done++) * 2) & 0x3));
   }
 





More information about the llvm-branch-commits mailing list