mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Read 64 bits at a time in the bitcode reader.
The reading of 64 bit values could still be optimized, but at least this cuts down on the number of virtual calls to fetch more data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221865 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -71,14 +71,10 @@ private:
|
||||
size_t bytes = Streamer->GetBytes(&Bytes[BytesRead + BytesSkipped],
|
||||
kChunkSize);
|
||||
BytesRead += bytes;
|
||||
if (bytes < kChunkSize) {
|
||||
assert((!ObjectSize || BytesRead >= Pos) &&
|
||||
"Unexpected short read fetching bitcode");
|
||||
if (BytesRead <= Pos) { // reached EOF/ran out of bytes
|
||||
ObjectSize = BytesRead;
|
||||
EOFReached = true;
|
||||
return false;
|
||||
}
|
||||
if (BytesRead <= Pos) { // reached EOF/ran out of bytes
|
||||
ObjectSize = BytesRead;
|
||||
EOFReached = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user