forked from OSchip/llvm-project
get the first few tags from a precomputed table (count can be increased if desired)
llvm-svn: 108549
This commit is contained in:
parent
c1198c320f
commit
fee4dafbd0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue