get the first few tags from a precomputed table (count can be increased if desired)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108549 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif 2010-07-16 20:35:19 +00:00
parent 32bb4dfd19
commit 345ce549a9

View File

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