OSDN Git Service

Reapply "ADT: Shrink size of SmallVector by 8B on 64-bit platforms"
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 20 Jul 2018 00:44:58 +0000 (00:44 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 20 Jul 2018 00:44:58 +0000 (00:44 +0000)
commit604b45ddcfdc90ff66d39bc4fb7cc88f62f26499
tree846fcadb6dd7c69d5713f28ee06f143cd0ca7db2
parent40d8d2b15d4494ef10a219beca90e25ee4f859e6
Reapply "ADT: Shrink size of SmallVector by 8B on 64-bit platforms"

I'm optimistically reverting commit r337511, effectively reapplying
r337504 *without* changes.

The failing bots that had `SmallVector` in the backtrace recovered after
the unrelated commit r337508.  The backtraces looked bogus anyway, with
`SmallVector::size()` calling (e.g.) `ConstantArray::get()`.

Here's the original commit message:

    ADT: Shrink size of SmallVector by 8B on 64-bit platforms

    Represent size and capacity directly as unsigned and calculate
    `end()` using `begin() + size()`.

    This limits the maximum size/capacity of a vector to UINT32_MAX.

    https://reviews.llvm.org/D48518

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337514 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/SmallVector.h
lib/Support/SmallVector.cpp