precompute 20 tags

llvm-svn: 108695
This commit is contained in:
Gabor Greif 2010-07-19 14:48:15 +00:00
parent eb2528104a
commit 39c06b3b23
1 changed files with 9 additions and 3 deletions

View File

@ -86,11 +86,17 @@ const Use *Use::getImpliedUser() const {
//===----------------------------------------------------------------------===//
Use *Use::initTags(Use * const Start, Use *Stop, ptrdiff_t Done) {
while (Done < 6) {
while (Done < 20) {
if (Start == Stop--)
return Start;
static const PrevPtrTag tags[6] = { fullStopTag, oneDigitTag, stopTag,
oneDigitTag, oneDigitTag, stopTag };
static const PrevPtrTag tags[20] = { fullStopTag, oneDigitTag, stopTag,
oneDigitTag, oneDigitTag, stopTag,
zeroDigitTag, oneDigitTag, oneDigitTag,
stopTag, zeroDigitTag, oneDigitTag,
zeroDigitTag, oneDigitTag, stopTag,
oneDigitTag, oneDigitTag, oneDigitTag,
oneDigitTag, stopTag
};
Stop->Prev.setFromOpaqueValue(reinterpret_cast<Use**>(tags[Done++]));
Stop->Val = 0;
}