[llvm-branch-commits] [llvm-branch] r201945 - remove an unnecessary runtime operation
Gabor Greif
ggreif at gmail.com
Sat Feb 22 11:38:29 PST 2014
Author: ggreif
Date: Sat Feb 22 13:38:29 2014
New Revision: 201945
URL: http://llvm.org/viewvc/llvm-project?rev=201945&view=rev
Log:
remove an unnecessary runtime operation
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=201945&r1=201944&r2=201945&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:38:29 2014
@@ -91,7 +91,7 @@ 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))
+# define TAG_AT(N, TAG) ((unsigned long)(TAG) << ((19 - (N)) * 2))
static const unsigned long tags =
TAG_AT(19, fullStopTag) | TAG_AT(18, oneDigitTag) | TAG_AT(17, stopTag) |
TAG_AT(16, oneDigitTag) | TAG_AT(15, oneDigitTag) | TAG_AT(14, stopTag) |
@@ -101,7 +101,7 @@ Use *Use::initTags(Use * const Start, Us
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));
+ new(Stop) Use(PrevPtrTag((tags >> Done++ * 2) & 0x3));
}
ptrdiff_t Count = Done;
More information about the llvm-branch-commits
mailing list